0

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?

Community
  • 1
  • 1
Rob
  • 7,980
  • 30
  • 75
  • 115

1 Answers1

2

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

xdissent
  • 949
  • 7
  • 7