Re: Extract column names from a (my)SQL query

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

 



On Wed, 19 Aug 2009 22:42:36 +0300, דניאל דנון wrote:

> Lets assume I have the following string:
> "SELECT field1, field2, field3 FROM tablename WHERE field1 = 'something' "
> 
> Is there any way to get "field1, field2, field3"? assuming it might also
> have join, left join - things like that.

If you're using MySQL, you can try mysql_field_name()
and see if it gets you anywhere. I don't think it works
on empty results though.


/Nisse

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux