SQL Query - Check Existance of Data/Column before making changes.
Hi Guys... I have 2 questions.
1) During an install I'm using "CREATE TABLE IF NOT EXISTS" to create tables but there's no similar option for ALTER TABLE so what is the best way to check if a column already exists in the users table?
2) During the same install I'm using INSERT INTO to populate a table... how do I check if the table is empy first?
THX!
Right now I'm just ignoring errors using $vbulletin->db->hide_errors(); but I'd rather do a proper check.
|