![]() |
not working: ALTER TABLE x ADD x IF NOT EXISTS
i'm trying to use a "IF NOT EXISTS" with a install code but i couldn't
could someone correct this for me? thx $db->query_write("ALTER TABLE accounts ADD group_id IF NOT EXISTS INT(11) NOT NULL COMMENT 'accounts group' AFTER password"); the error Code:
Database error in vBulletin 3.6.8: |
You can't directly use the IF NOT EXISTS method on column additions.
|
Use the db alter class, disable database errors before doing the query, or do another query to see if the column exists.
|
thanks Dismounted and SirAdrian i'll give a try!
|
All times are GMT. The time now is 09:23 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|