fixed wrong bracket causing SQL error: is not unique

This commit is contained in:
Ralf Becker 2013-07-04 16:42:33 +00:00
parent 6bfc93ad6c
commit 93eac83b8a

View File

@ -1002,7 +1002,7 @@ class so_sql
// add table-name to otherwise ambiguous id over which we join (incl. "AS id" to return it with the right name)
if ($join && $this->autoinc_id)
{
if (is_array($colums) && ($key = array_search($this->autoinc_id, $colums) !== false))
if (is_array($colums) && ($key = array_search($this->autoinc_id, $colums)) !== false)
{
$colums[$key] = $this->table_name.'.'.$this->autoinc_id.' AS '.$this->autoinc_id;
}