Forum Moderators: open
Currently my install script pulls all of the create table statements from an sql file and creates the tables.
What is the best way to detect which tables are present and which are present but need to be altered?
I'm currently using this but that doesn't take care of adding alter statements:
if(!sql_result3)
{
if(mysql_errno() == 1062)
{
$errors[] = 'Duplicate entry, proceeding to next record...<br />';
}
if(mysql_errno() == 1060)
{
$errors[] = 'Duplicate column entry, proceeding to next record...<br />';
}
else {
die(sprintf("Couldn't execute query, %s: %s", db_errno(), db_error()));
}
}
Thanks,
Tim
[edited by: txbakers at 2:11 pm (utc) on May 22, 2006]
[edit reason] no URL signatures, please per TOS [/edit]
You can use DESCRIBE to see if that table still has the right structure
[dev.mysql.com...]