Re: mysql_fetch_object
| From: | Bob Lockie | Date: | Mon, 28 Jun 2004 16:42:54 +0000 |
| Subject: | Re: mysql_fetch_object | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35021@lists.php.net to get a copy of this message | ||
On 06/28/2004 12:07 PM Larry E.Ullman spoke:
How does it handle fully qualified conflicting columns, like 'select a.name, b.name from a, b'?I'm using $row = mysql_fetch_object and I can reference column names by $row->name but how do I reference a pseudo column (that I make, like substring( name from 1 ))?Use an alias in your query: SELECT column, DATE_FORMAT('%m', date_column) AS d FROM table ... $row->d Larry