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


Database won't accept this query. SQL syntax wrong?





SpellcasterDX
Code:
ALTER TABLE `disco_users` ADD

  `baseball` varchar(100) NOT NULL default '',
  `football` varchar(100) NOT NULL default '',
  `hockey` varchar(100) NOT NULL default '',
  `basketball` varchar(100) NOT NULL default '',
  `soccer` varchar(100) NOT NULL default '',
  `baseball2` varchar(100) NOT NULL default '',
  `basketball2` varchar(100) NOT NULL default '',
  `football2` varchar(100) NOT NULL default '',
  `hockey2` varchar(100) NOT NULL default '',
  `soccer2` varchar(100) NOT NULL default '',


The database won't accept that query. How do I edit it so the database will accept it?

(This is for members of my forums to choose their favorite soccer/basketball/football/hockey/baseball teams and they're 2nd favorite teams)
yy1124
Code:
ALTER TABLE `disco_users` ADD (

  `baseball` varchar(100) NOT NULL default '',
  `football` varchar(100) NOT NULL default '',
  `hockey` varchar(100) NOT NULL default '',
  `basketball` varchar(100) NOT NULL default '',
  `soccer` varchar(100) NOT NULL default '',
  `baseball2` varchar(100) NOT NULL default '',
  `basketball2` varchar(100) NOT NULL default '',
  `football2` varchar(100) NOT NULL default '',
  `hockey2` varchar(100) NOT NULL default '',
  `soccer2` varchar(100) NOT NULL default '');


how bout this?
(posted at a wrong place?)
Daniel15
The query that yy1124 posted should work. If you're still having problems, could you please post the whole error message here?
SpellcasterDX
Thanks. It worked. (I took it from a full query for an entire table, hence the missing ");" )

This topic can be locked now. Smile
Daniel15
Glad to see that you solved it Smile
-close-
Related topics
have problem on my sql
MySQL DB Backup script - minor problem
Help with mysql query
setup.php
Sql/Phpbb error...
Is this code safe, or not?
Error, insert query failed - My nick is'nt a db friend =/
Setting up a Database
Problems with SQL
How to search in a MySQL - database
whats wrong with this mysql query?
SQL Syntax related to Date [NOW()]
Database not update. Where is my wrong code?
PHP and Javascript Issue handling data from a mysql query
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

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