开发者

my mysql query doesn't update my table

开发者 https://www.devze.com 2023-03-07 05:27 出处:网络
$query=UPDATE americana SET 7=\'99\' WHERE Bdate开发者_如何学运维=\'2011-04-15\'; mysql_query($query);
$query=UPDATE americana SET 7='99' WHERE Bdate开发者_如何学运维='2011-04-15';

mysql_query($query);

7 is a column name and Bdate too it doesn't update my table?


if so enclose it with backtick "`"

$query="UPDATE americana SET `7`='99' WHERE Bdate='2011-04-15'"; 


$query="UPDATE americana SET `7`='99' WHERE Bdate='2011-04-15'";
mysql_query($query);

The query should be enclosed in quotes and also marked column name with backtick(`)sign if it has name with starting from numeric value, try it now and see if it works better now...

0

精彩评论

暂无评论...
验证码 换一张
取 消