Jump to content

empty records are inserted.


coder9

Recommended Posts

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.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/116151-empty-records-are-inserted/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.