FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Debug my SQL query please





SpellcasterDX
Yes, I'm back with my wrong sql queries. A little help? Laughing

Code:
ALTER TABLE `disco_boards` ADD
modpost varchar(2) NOT NULL, default '0',
managerpost varchar(2) NOT NULL, default '0',
editorpost varchar(2) NOT NULL, default '0',
adminpost varchar(2) NOT NULL, default '0',
hexkid
SpellcasterDX wrote:
Yes, I'm back with my wrong sql queries. A little help? Laughing

Code:
ALTER TABLE `disco_boards` ADD
modpost varchar(2) NOT NULL, default '0',
managerpost varchar(2) NOT NULL, default '0',
editorpost varchar(2) NOT NULL, default '0',
adminpost varchar(2) NOT NULL, default '0',


According to the MySQL manual, the last comma shouldn't be there and the column definition should be between parenthesis. Also you cannot use 1 ADD for multiple columns. Try this:
Code:
alter table `disco_boards`
add (modpost varchar(2) not null default '0'),
add (managerpost varchar(2) not null default '0'),
add (editorpost varchar(2) not null default '0'),
add (adminpost varchar(2) not null default '0')


[minor edits]
SpellcasterDX
THat worked. Thanks!
Related topics
I cant install php chat tables nor set up diffrent subdomain
SQL to XML converter
sql with phpmyadmin
MySql to SQL
Can't create mySQL table
My first PHP + mySQL page - Need feedback
Forum Change Help - REPLY FAST PLS
SQL query problem
Can't access the index of my boards!
[man]Instala Tu Propio Rocp para el RO
Database Privilege
PhpNuke Installation Tutorial
need help restoring phpbb database from old webhost.
what is wrong with this query? Please please help!
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.