I'm trying to count rows in two tables, but I keep getting the following error:
Warning: Supplied argument is not a valid MySQL result resource in /web/phpads/docs/phpAdsNew/adstats.php on line 15
my code looks like this:
while(list($clientID) = mysql_fetch_row($result)){
$count = "select count(*) as adviews from adviews where bannerID='$clientID' AND where t_stamp LIKE '%$pulldate%'";
$av = mysql_query(database,$count);
list($adviews) = mysql_fetch_row($av);
$count = "select count(*) as adclicks from adclicks where bannerID='$clientID' AND where t_stamp LIKE '%$pulldate%'";
$ac = mysql_query(database,$count);
list($adclicks) = mysql_fetch_row($ac);
$stats[$i] = array($clientID,$adviews,$adclicks);
$i++;
}
the sql statement works when run from the commandline, so it's having a problem with my list() command.
Maybe there is something in there that I can't see that you can.
Ron