Question
un known query result
I have one query which is running good and it is producing no
error:
just this is the query:
<cfquery datasource="#request.dsn#" username="#request.user#" password="#request.password#" name="randommode">
Select DISTINCT(property_id), property_file, property_unique_name,
mode, price_range, status
FROM
properties_details
where properties_details.status = <cfqueryparam cfsqltype="cf_sql_numeric" value="1">
AND
properties_details.mode = <cfqueryparam cfsqltype="cf_sql_varchar" value="Rental">
OR
properties_details.mode = <cfqueryparam cfsqltype="cf_sql_varchar" value="Sale">
ORDER BY rand()
limit 3
</cfquery>
i am getting results where the status is 1 and if mode is 2, then property will not show up but for unknown reason it is not procduing any error and it is returning all the properties wheather the status is 1 or 2
if i removce the following options of "rental" and "sale" then this query runs good but if i attach them it returns all results whose status is 1 or 2
just this is the query:
<cfquery datasource="#request.dsn#" username="#request.user#" password="#request.password#" name="randommode">
Select DISTINCT(property_id), property_file, property_unique_name,
mode, price_range, status
FROM
properties_details
where properties_details.status = <cfqueryparam cfsqltype="cf_sql_numeric" value="1">
AND
properties_details.mode = <cfqueryparam cfsqltype="cf_sql_varchar" value="Rental">
OR
properties_details.mode = <cfqueryparam cfsqltype="cf_sql_varchar" value="Sale">
ORDER BY rand()
limit 3
</cfquery>
i am getting results where the status is 1 and if mode is 2, then property will not show up but for unknown reason it is not procduing any error and it is returning all the properties wheather the status is 1 or 2
if i removce the following options of "rental" and "sale" then this query runs good but if i attach them it returns all results whose status is 1 or 2
