Jump to content

Is this update syntax correct?


coder9

Recommended Posts

No, the syntax is not correct. Field names should not be quoted with single quotes. Did you try it?

 

<?php
$tmp_name = 'user_box' . $link;
$query = "UPDATE jtablegrid SET $tmp_name = '$username' WHERE game_no = 1; 
mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error());
?>

 

Ken

No, the syntax is not correct. Field names should not be quoted with single quotes. Did you try it?

 

<?php
$tmp_name = 'user_box' . $link;
$query = "UPDATE jtablegrid SET $tmp_name = '$username' WHERE game_no = 1; 
mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error());
?>

 

Ken

 

thank you KEN

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.