Forum Moderators: coopster
mysql_query("UPDATE armoury SET number = '1' WHERE id = '".$fdatabase[id]."'") or die(mysql_error()); And then i read number:
echo(mysql_fetch_array(mysql_query("SELECT number FROM armoury WHERE id = '$fdatabase[id]'"))); //results 0
And when I refresh page this code normally results 1.
What's worng? I think long database updating time is the reason.
Any help would solve all my problems.
$result = mysql_query("SELECT number FROM armoury WHERE id = '".$fdatabase['id']."'") or die(mysql_error());
$row = mysql_fetch_array($result);
echo '<pre>';
print_r($row);
echo '</pre>';
This should be a good start in discovering the problem as I fixed some errors ;)
There is something wrong with your logic here, because if this is done correctly it will work as you want. Check the value of $fdatabase[id] before each query and also make sure that that unique id actually exists.