|

|
abstract:
what i was trying is that if isTut is yes, it should count only records which have the value of yes.
but apparently it is counting all the records no matter what the istut is:
cou'nd figure it out why this is happening.
like if i have 10 records in total. and 4 records are those who ISTUT is yes.
it displays all 10 COUNT records either i display it as isTut= yes or isTute = No
while it should return COUNT 4 records if isTut is yes.
Well Guys, My This post was posted in the MYSQL databases as i thought i was something wrong with the database may be but it tends t continue persis with same problem: i so i though here i should give it a try:
Here is the modified code of myselect statement.
SELECT *
FROM table1
INNER
JOIN categories
ON categories.catID = table1.catID
WHERE (
categories.parentid = #url.catID#
OR categories.catID = #url.catID#
)
AND Allow = <cfqueryparam cfsqltype="cf_sql_varchar" value="Y">
AND Approve = <cfqueryparam cfsqltype="cf_sql_varchar" value="Y">
<cfif isdefined('url.t') AND url.t eq 'upda'>
AND isTut = <cfqueryparam cfsqltype="cf_sql_varchar" value="Yes">
<cfelse>
AND isTut = <cfqueryparam cfsqltype="cf_sql_varchar" value="No">
</cfif>
problem is with the counts. it is counting all the records irrespective of the Istut filter defined below:
what i was trying is that if isTut is yes, it should count only records which have the value of yes.
but apparently it is counting all the records no matter what the istut is:
cou'nd figure it out why this is happening.
like if i have 10 records in total. and 4 records are those who ISTUT is yes.
it displays all 10 COUNT records either i display it as isTut= yes or isTute = No
while it should return COUNT 4 records if isTut is yes. |
|