Hi all,
When someone tries to log into one of my pages i run a query to check if the login/password combo exists. I've then wrapped the code that begins the logged in session inside this:
<cfif queryname.recordcount>
set session variable
</cfif>
Will that cfif statement work to stop the 'set session variable' when there is not a match in the database? The reason I ask is that I remember reading once that cfquery always returns at least one record (even if nothing matches. Does this mean that <cfif queryname.recordcount> will always return a 'TRUE'?
When someone tries to log into one of my pages i run a query to check if the login/password combo exists. I've then wrapped the code that begins the logged in session inside this:
<cfif queryname.recordcount>
set session variable
</cfif>
Will that cfif statement work to stop the 'set session variable' when there is not a match in the database? The reason I ask is that I remember reading once that cfquery always returns at least one record (even if nothing matches. Does this mean that <cfif queryname.recordcount> will always return a 'TRUE'?