Count

Posted on 16th Feb 2014 by admin

Getting the same count everytime

Code:
$visitquery = mysql_query("SELECT COUNT(*) FROM visitors WHERE ownerkey = '$uuid' & region = '$selected' AND `date` < DATE_ADD(CURDATE(), INTERVAL +7 DAY)", $connect);
$row9 = mysql_fetch_array($visitquery);
$visitoramount = $row9[0];
print "[$visitoramount] visits in the last 7 days!";
If $selected = "Blah" it gives the count as " 8"
if $selected = "Dumb" it gives the count as "8" ... Al though there is no "Dumb" in the db.

Sorry if my explaining is off. Just dont know another way to explain it easier.

Other forums