[Solar-svn] Revision 3235

pmjones at solarphp.com pmjones at solarphp.com
Mon Jul 21 16:12:51 CDT 2008


Solar_Sql_Select: [FIX] In fetch() method, do not alias a '*' column name (fixes '* AS *' error).


Modified: trunk/Solar/Sql/Select.php
===================================================================
--- trunk/Solar/Sql/Select.php	2008-07-17 20:21:03 UTC (rev 3234)
+++ trunk/Solar/Sql/Select.php	2008-07-21 21:12:50 UTC (rev 3235)
@@ -1070,8 +1070,9 @@
                 }
                 
                 // force an "AS" if not already there, but only if the source
-                // is not a manually-set column name.
-                if ($source['type'] != 'cols') {
+                // is not a manually-set column name, and the column is not a
+                // literal star for all columns.
+                if ($source['type'] != 'cols' && $col != '*') {
                     // force an AS if not already there. this is because
                     // sqlite returns col names as '"table"."col"' when there
                     // are 2 or more joins. so let's just standardize on




More information about the Solar-svn mailing list