Re: [PHP-DB] RE: [PHP] If Column Exists

2008-08-13 Thread Chris
Simcha wrote: You can try 'select `testcol` from `table`' and then check if you got a mysql_error(). If you do that, and the column exists, and there are 100,000 rows in there - you just selected 100,000 rows. Add a limit 1 to the end to only get one row. -- Postgresql & php tutorials http:

Re: [PHP-DB] RE: [PHP] If Column Exists

2008-08-13 Thread Evert Lammerts
SHOW COLUMNS FROM tablename; Also check http://dev.mysql.com/doc/refman/5.0/en/ On Wed, Aug 13, 2008 at 3:02 PM, Simcha <[EMAIL PROTECTED]> wrote: > You can try 'select `testcol` from `table`' and then check if you got a > mysql_error(). > > > > -Original Message- > From: Robin Vickery [m

[PHP-DB] RE: [PHP] If Column Exists

2008-08-13 Thread Simcha
You can try 'select `testcol` from `table`' and then check if you got a mysql_error(). -Original Message- From: Robin Vickery [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2008 10:33 AM To: php List Subject: Re: [PHP] If Column Exists 2008/8/12 VamVan <[EMAIL PROTECTED]>: > Hel