SOLVED
Posted: Thu Apr 20, 2006 11:28 pm
if (!$num_rows) {
That's the little bugger.
So here it is in it's final form:
Muchos Gacias, ole!
That's the little bugger.
So here it is in it's final form:
Code: Select all
$recordID = $_GET['recordID'];
$db = mysql_select_db($db_name, $db_handle) or die (mysql_error());
$rc = "select * from popup where rest = '$recordID'";
$restchk = mysql_query($rc) or die (mysql_error());
$num_rows = mysql_num_rows($restchk);
if (!$num_rows) {
$sql = "insert into popup values ('', '$recordID', now(), '1')";
mysql_query($sql);
} else {
$sqlu = "update popup set hits = hits ++1 where rest = '$recordID'";
mysql_query($sqlu);
};