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

2009-08-20 Thread kranthi
this might be some help... http://stackoverflow.com/questions/283087/php-mysql-sql-parser-insert-and-update -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2009-08-20 Thread דניאל דנון
I haven't finished reading it yet - but this looks great - Thank you so much! On Thu, Aug 20, 2009 at 4:36 PM, kranthi kranthi...@gmail.com wrote: this might be some help... http://stackoverflow.com/questions/283087/php-mysql-sql-parser-insert-and-update -- Use ROT26 for best security

[PHP] Extract column names from a (my)SQL query

2009-08-19 Thread דניאל דנון
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. I can easily do it with preg_match, but I have to make sure its