Re: Check if column exsit in DB
| From: | Geoff Coffey | Date: | Fri, 05 Jan 2001 14:49:39 +0000 |
| Subject: | Re: Check if column exsit in DB | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32883@lists.php.net to get a copy of this message | ||
on 1/4/01 10:40 PM, John LYC at john@edlabs.com wrote:
> Hi,
> mysql question.
>
> How do i check if column exist in DB...?
> if (yes)
> { do something;}
>
> i know normally, sql will die if column is non existing...
It may depend on your DBMS, but try executing the sql "describe <tablename>"
and processing the result set.
Hope that helps,
Geoff