Reputation: 59
$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?
Upvotes: 0
Views: 199
Reputation: 8629
$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...
Upvotes: 0
Reputation: 17653
if so enclose it with backtick "`"
$query="UPDATE americana SET `7`='99' WHERE Bdate='2011-04-15'";
Upvotes: 10