Jay Blanchard wrote:

> [snip]
> I am working on data migration for one mysql db to another using PHP.
> How do
> I check if a particular table has a particular column. If not alter...
> [/snip]
> 
> Use DESCRIBE TABLE;
> 

Then you'd have to parse the output - how about

SELECT <column> FROM <table> LIMIT 1  ?

The query will fail if the column doesn't exist.


/Per Jessen, Zürich


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

Reply via email to