The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
whats the php code, for
'If this table exists... do this'? |
|
#2
|
||||
|
||||
|
CREATE TABLE IF NOT EXISTS `table_name`
IF NOT, IF |
|
#3
|
|||
|
|||
|
what if its not a table? i need to make a coloum in the user table
|
|
#4
|
|||
|
|||
|
ALTER TABLE IF EXISTS `table_name` ADD `column_name`...
|
|
#5
|
|||
|
|||
|
PHP Code:
|
|
#6
|
|||
|
|||
|
To test if a column exists, you cna use the following query:
[sql]SHOW COLUMNS FROM <tablename> WHERE field = '<columnname>';[/sql] Alternative you could disable error reporting and just run the query to add the column. |
|
#7
|
|||
|
|||
|
could i have the exact code? i need to add a feild to the 'user' table, called 'xtreme_top_100' and thats it
|
|
#8
|
|||
|
|||
|
turn off error reporting:
PHP Code:
|
|
#9
|
|||
|
|||
|
lol :P
and thanks ^^ |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|