Answered
my query or i might be wrong?
I have one MYSQL query Which I think is right but not know it
is right or not:
it does not produce the required output as i have records in the database:
here is the query:
<cfquery datasource="#request.dsn#" name="newclass" username="#request.user#" password="#request.pass#">
SELECT grcat.cid,grcat.title, count(listid) as totallist
FROM grcat
LEFT JOIN grlist ON grcat.cid = grlist.cid
WHERE
parentid = <cfqueryparam cfsqltype="cf_sql_numeric" value="#url.cid#">
AND
active = <cfqueryparam cfsqltype="cf_sql_tinyint" value="1">
GROUP BY
grcat.cid
</cfquery>
<cfdump var="#newclass#">
it does not produce the required output as i have records in the database:
here is the query:
<cfquery datasource="#request.dsn#" name="newclass" username="#request.user#" password="#request.pass#">
SELECT grcat.cid,grcat.title, count(listid) as totallist
FROM grcat
LEFT JOIN grlist ON grcat.cid = grlist.cid
WHERE
parentid = <cfqueryparam cfsqltype="cf_sql_numeric" value="#url.cid#">
AND
active = <cfqueryparam cfsqltype="cf_sql_tinyint" value="1">
GROUP BY
grcat.cid
</cfquery>
<cfdump var="#newclass#">
