Im trying to update my table (which only contains one row with id=1), but can't get the UPDATE mySQL query working.
My query looks like this:
$result = mysql_query("UPDATE site_rating SET rating1 = '$read_rating['rating1']', rating2 = '$read_rating['rating2']', rating3 = '$read_rating['rating3']', rating4 = '$read_rating['rating4']', rating5 = '$read_rating['rating5']' WHERE id = 1");
My table rating contains fields id, rating1, rating2, rating3, rating4, rating5, no_of_votes
(The variable (ok, array element) $read_rating['rating1'] contains the new number to be sent into the field rating1)
If I use this query, then it works like charm:
mysql_query("UPDATE site_rating SET rating1 = '$slask', rating2 = '$slask' WHERE id = 1");
I guess there is some problem using statements like this in the update query?
$read_rating['rating5']
It doesn't work if i skip the ' around $read_rating['rating5'] in the query either...
Thanks for all help in advance.
/Anders