开发者

my mysql query doesn't update my table

$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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜