Problem is I'm accessing mysql through scripting against a table 
that may or may not have ID field, 

select count(*) from (desc ATTRIBUTES) where Field ='ID';
if count(*) > 0 then  
  select ID from ATTRIBUTES;
else
  do something else;
end if;


-----Original Message-----
From: Gurhan Ozen [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 5:57 PM
To: hong chen
Subject: RE: create tmp table of column list of a table for future use


SHOW CREATE TABLE ... syntax will show you whether or not the field name is
there..

Gurhan


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to