I am having a hard time figuring out why when the cfquery runs in my code it is only returning one row when it should be returning three rows.
In almost all cases this cfquery is returning the correct data. For one or two users the cfquery is returning only 1 row (out of 3). I take the output from the debug info that coldfusion spits out and run that query in toad and the correct results are shown.
What could cause the cfquery and toad results to be different? One of the columns I'm returning is user defined and maybe the column has some special characters in it that cause the result to not be returned? I am really stumped and noone around here knows any coldfusion to even help me think about this. So I turn to SO.
I'm searching on the web as we speak.
ADDED:
<cfquery name="getInfo" datasource="#DSN#">
SELECT
u.user_no, u.username, u.description
FROM
user_info u
WHERE
u.parent = #session.user_no#
ORDER BY
u.username ASC
</cfquery>
Again, one a few users it returns one row out of three and on the rest it seems to return the all the correct resuts.
** UPDATE ** Not that anyone cares, but just Today this problem was resolved! If you want to know what it was I'll tell you.
Turns out the tester who was testing this piece of code (who claimed that she was clearing her cache!) didn't clear her cache! She had me running around trying to fix it up when she was feeding me some B.S. after I told her that was the likely problem. Oh well, I didn't spend too much time on it. Thanks all for the answers about the cfqueryparam, I'll be using those from now on in my coldfusion coding.
Cheers!