Re: mysql_fetch_object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux