From 7134b9716e37b98323b2a95b4277e14a570c066a Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 19 Dec 2014 09:25:14 +0000 Subject: [PATCH] Convert ambiguous column to tablename.column name --- etemplate/inc/class.so_sql.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.so_sql.inc.php b/etemplate/inc/class.so_sql.inc.php index c6c5ecad66..d7f799e0fe 100644 --- a/etemplate/inc/class.so_sql.inc.php +++ b/etemplate/inc/class.so_sql.inc.php @@ -980,7 +980,8 @@ class so_sql $colums = array(); foreach($only_keys as $key => $col) { - $colums[] = ($db_col = array_search($col,$this->db_cols)) ? $db_col : $col; + //Convert ambiguous columns to prefixed tablename.column name + $colums[] = ($db_col = array_search($col,$this->db_cols)) ? $this->table_name .'.'.$db_col.' AS '.$col :$col; } } elseif (!$only_keys)