hello,
my table only has one row in it and has two fields. I want to select those 2 fields, get the number, add 1 to each of them, and update the record.
I can't figure out why this does not work.
What am I missing here????
I don't need to specify a row id, DO I?
I tried mysql_fetch_row() and mysql_fetch_array().
THANKS for your help.
$sql = "SELECT max(totalvisitor) + 1, max(returnvisitor) + 1 FROM totalvisitor";
$res = mysql_query($sql);
$fa = mysql_fetch_row($res);
$totvis = $fa["totalvisitor"];
$retvis = $fa["max(returnvisitor)"];
$sql = "UPDATE totalvisitor SET returnvisitor ='$retvis', totalvisitor ='$totvis'";
$res = mysql_query($sql);