tags:

views:

49

answers:

1

Before you flag this as a duplicate, I've read the other question, and it pertains to a different version of MySQL. I'm running the next up major version: MySQL version 5.0.91-community

I need to drop a column if it exists, and I also need to add a column if not exists.

How can I go about doing this in PHP?

+2  A: 

You probably need a stored procedure: http://bitkickers.blogspot.com/2010/01/mysql-drop-column-if-exists.html

xdissent
Wait isn't that the same answer from the other question. It's supposed to work with MySQL 5+...
xdissent
How would I go about storing this?
Rob