I want to update a number in a database each time with 1.
Now I first do a Select to get the old number.
and than update with the new number.
Code: Select all
SELECT num FROM database WHERE id='x';
$newnum=$oldnum+1;
UDPATE database set num='$oldnum' WHERE id='x';