The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help with add field vb/php syntax
PHP Code:
|
#2
|
||||
|
||||
Quote:
|
#3
|
|||
|
|||
Expand a table.
|
#4
|
|||
|
|||
but i see no problem in that query.. what is the problem ?! btw, you can even make it smaller:
PHP Code:
|
#5
|
|||
|
|||
PROBLEM SOLVED - Must use `21398` thingies around numbers.
<> <> <> Invalid SQL: ALTER TABLE testtable ADD test int(10) unsigned DEFAULT '0' NOT NULL mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'test int(10) unsigned DEFAULT '0' NOT NULL' at line 2 mysql error number: 1064 ( MySQL 4.0.20 ) __________ On smaller code: Invalid SQL: ALTER TABLE testtable ADD test int(10) mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'test int(10)' at line 1 _____________ UPDATE - Errors on normal SQL in phpmyadmin too... Can anyone just try it for the heck of it? Error: 1064 SQLSTATE: 42000 (ER_PARSE_ERROR) Message: %s near '%s' at line %d It works with 'test' as a name, but I guess you can't use numbers as a structure name? _______________ MORE - If you put `these_things` around numbers it works in SQL |
#6
|
||||
|
||||
Quote:
$DB_site->query("ALTER TABLE " . TABLE_PREFIX . "table ADD test int(10)"); thats only in vBuletin files this would be used for a style you would do this in phpmyadmin i think ALTER TABLE PREFIX_table ADD test int(10); Might be wrong but hopefully someone will tell me if im wrong or wrong. |
#7
|
|||
|
|||
I know to use normal SQL in phpmyadmin, but you need to use`` around names of fields that are numbers (like `1443` or `2` as a field name)
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|