Forum Moderators: coopster
...
$res = mysql_query("SELECT * FROM temp");
while ($row = mysql_fetch_assoc($res))
{
$Puncte = 0 + $row['Total'];
mysql_query("UPDATE sportivi SET Puncte_08 = (Puncte_08 + ".$Puncte.")") or die(mysql_error());}
The Puncte_08 field is INT(3).. isn't mysql doing well with updating a field by using a php variable? I can't find any help on google :)
Thanks in advance
If that doesn't work you can always echo("UPDATE sportivi SET Puncte_08 = (Puncte_08 + '{$Puncte}');"); and insert that query manually and see if it works. Just a warning, realize that saying set somevar = somevalue without a where clause will set every row in that column to that value.