[Solar-svn] Revision 2748
pmjones at solarphp.com
pmjones at solarphp.com
Sat Sep 8 13:55:44 CDT 2007
branch: Solar_Sql_Select: [FIX] When finding identifer aliases, use strripos() to get the right-most AS (vice stripos(), which finds the left-most one).
Modified: branches/orm/Solar/Sql/Select.php
===================================================================
--- branches/orm/Solar/Sql/Select.php 2007-09-08 16:46:11 UTC (rev 2747)
+++ branches/orm/Solar/Sql/Select.php 2007-09-08 18:55:43 UTC (rev 2748)
@@ -1133,8 +1133,9 @@
*/
protected function _origAlias($name)
{
- // does the name have an "AS" alias?
- $pos = stripos($name, ' AS ');
+ // does the name have an "AS" alias? pick the right-most one near the
+ // end of the string (note the "rr" in strripos).
+ $pos = strripos($name, ' AS ');
if ($pos !== false) {
return array(
'orig' => trim(substr($name, 0, $pos)),
More information about the Solar-svn
mailing list