coder9 Posted July 23, 2008 Share Posted July 23, 2008 hi i use these codes below to insert another record. $query = "INSERT INTO jtablegrid (game_no) VALUES ('ok')"; mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); the problem is, it insert another record, not only one but two? i only need one new record, with game_no table column to be fill with string 'ok'. also the string 'ok' is not inserted, why? What am i doing wrong? thank you in advance. Quote Link to comment Share on other sites More sharing options...
LemonInflux Posted July 23, 2008 Share Posted July 23, 2008 I presume game_no means game_number, which is probably an INT value, and ok isn't an INT? Try inserting 3 ---------------- Now playing: Linkin Park - My<Dsmbr (Mickey P. ft. Kelli Ali) via FoxyTunes Quote Link to comment Share on other sites More sharing options...
coder9 Posted July 23, 2008 Author Share Posted July 23, 2008 thank you. it is now filling the column with integer value. also i have question. about this, $query = "UPDATE jtablegrid SET $tmp_name='$username' WHERE game_no = $game_no"; at the end part of that statement. do i need to put string quote like this '$game_no' or only this $game_no without the quotes, thank you. 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.