SQL Error
-
Hello,
I was digging through our site error_log, and I keep seeing intermittent SQL errors related to Simple Ad Manager…
WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '), 0) AS aca...
I did some digging and found where the query is generated in ad-class.php, line 365…
@aca := IFNULL((SELECT AVG(sa.ad_weight_hits*10/(sa.ad_weight*$cycle)) FROM $aTable sa WHERE sa.pid = @pid AND sa.trash IS NOT TRUE AND {$whereClause} {$whereClauseT} {$whereClause2W}), 0) AS aca
It appears that the variables $whereClause, $whereClauseT, and $whereClause2W are not being set and leaving an empty space in the query.
This isn’t a serious issue. Looking at the ads from the front end, the ads are delivering as they should be. I’m just curious as to what could be causing this error.
Thanks!
- The topic ‘SQL Error’ is closed to new replies.