-
☆ A M B ☆
- 24,524 Posts
May I suggest that the check for a valid table depend on the mysql_error_no that gets returned before attempting to create the table? Just trying to create the table whenever the DESCRIBE query fails can cause all kinds of chaos if there are other database problems. I believe that the table doesn’t exist error is 1146.
http://dev.mysql.com/doc/refman/5.0/en/error-messages-server.html
I’ll convert all sql queries to use modx db api.. don’t know if db api checks for mysql errors, but it should.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."