Joined: Feb 26, 2006 Posts: 337 Location: Jackson, Mississippi
Posted:
Thu Sep 14, 2006 10:07 am
When I insert my row of info its adding a row of blanks with its own id.
Did I format any of this wrong?
Code:
CREATE TABLE nuke_league_games (
gid int NOT NULL auto_increment,
PRIMARY KEY (gid),
gname text NOT NULL,
version text NOT NULL,
gabbr text NOT NULL
) TYPE=MyISAM;
Code:
$addgame = $db->sql_query("INSERT INTO ".$prefix."_league_games VALUES (null, '$gtitle','$version','$abrev')");
Joined: Aug 29, 2004 Posts: 9136 Location: Arizona
Posted:
Fri Sep 15, 2006 7:20 am
floppydrivez, I used your original CREATE statement from above to create the table and then I tried this exact INSERT statement:
INSERT INTO nuke_league_games VALUES (null, 'title','version','abrev');
It inserted just fine and only 1 row. I believe that you may have had an issue with how your variables were getting defined/valued and that it had nothing to do with the actual SQL.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum