Hey,
I'm running the below queries and they don't seem to be working.
The code sets the value in "credits" to 0 and the value in "earned" stays the same.
I'm pretty sure that the variables are all correct (As in all of the variables in the queries have a value)
$query = "SELECT credits, earned FROM users WHERE id=$user";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array( $result );
$credits = ($row['credits'] + 0.7);
$earned = ($row['earned'] + 0.7);
$query = "UPDATE users SET credits=$credits AND earned=$earned WHERE id=$user";
$result = mysql_query($query) or die(mysql_error());
Why? 🙁
Thanks!