Quote:
Originally Posted by Tekton
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
|
are you using this in phpmyadmin?
$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.