Quote:
Originally Posted by AndrewD
|
I have created a own module i call "ldm-hotcat.php" that is basicly a hot category.
Since i use the category as a filename, lets say "miranda" and then post a link for each version "miranda 1.0", "miranda 2.0" etc i want all hits to be collected together inside that category so i use the following code as SQL, other then that there is no changes made to the original "ldm-hot.php"
PHP Code:
SELECT cat.catid AS linkid, cat.catname AS linkname, cat.catdesc AS linkdesc,
SUM(link.linkhits) AS linkhits, link.linkstatus AS linkstatus
FROM ".THIS_TABLE."linksltoc AS ltoc
LEFT JOIN ".THIS_TABLE."linkslink AS link
ON ltoc.linkid = link.linkid
LEFT JOIN ".THIS_TABLE."linkscat as cat
ON ltoc.catid = cat.catid
GROUP BY cat.catid
$order
LIMIT $linksee
The problem is that when i use the $filter i get a SQL error, cant see why...
if the filter is "WHERE link.linkmoderate = 0" it gives a error which it shouldnt, or am i just blind