coder9 Posted July 27, 2008 Share Posted July 27, 2008 hello i have this code below. $query = "INSERT INTO jwinners (gsid, game_no) VALUES (1,'.$current_game_no.')"; I'm a little confused and don't know exactly what value to put on a column that has auto increment (index). notice that gsid is an auto increment column. I wonder what is the right syntax for the INSERTion? i just put the 1 value into gsid column. and it generated an error. since gsid is auto increment column, i don't know what to put. Thank you. Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted July 27, 2008 Share Posted July 27, 2008 the gsid . The ID column. ACE Quote Link to comment Share on other sites More sharing options...
DarkWater Posted July 27, 2008 Share Posted July 27, 2008 You don't put anything into that column. $sql = "INSERT INTO jwinners (game_no) VALUES ('$current_game_no')"; Quote Link to comment Share on other sites More sharing options...
coder9 Posted July 27, 2008 Author Share Posted July 27, 2008 the gsid . The ID column. ACE Yes, exactly. that is the ID column. Quote Link to comment Share on other sites More sharing options...
coder9 Posted July 27, 2008 Author Share Posted July 27, 2008 You don't put anything into that column. $sql = "INSERT INTO jwinners (game_no) VALUES ('$current_game_no')"; @DarkWater Thank you! Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted July 27, 2008 Share Posted July 27, 2008 the gsid . The ID column. ACE Yes, exactly. that is the ID column. in saying that you could make either one the auto increment column. But if you wish to insert the game number manually. Then its fine how it is. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted July 27, 2008 Share Posted July 27, 2008 You don't put anything into that column. $sql = "INSERT INTO jwinners (game_no) VALUES ('$current_game_no')"; @DarkWater Thank you! No problem, please mark this topic as solved. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.