Query Of Queries runtime error

Hi CB Community,
I’m working on the security (login) for my coldbox app and have ran into a
Why am I getting a query of queries error when I only have 1 query?
I’ve read online about this being a scope issue but don’t know where to start to fix this error.
Any help is greatly appreciated.
Thanks,
Derek

Hello,

I’m not really following what your question is. Can you provide us with the code in question and the full error message?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Relevant code and environment details, please.

I was trying to follow the SampleLoginApp and use a database as the datasource instead of the XML

i have 2 files in the model folder: SecurityInterceptor.cfc and SecurityService.cfc

SecurityService.cfc (error points to the sql query):

`

select * from smuser where username = and password =

`

oops… typo in “struckt” lol… but the error points to the single cfquery

A query of queries is an in-memory operation that does not hit your database. You are asking CF to query on a variable called smuser, but I don’t see that variable declared anywhere.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hi Brad,
smuser is the table name in that cfquery
its not a variable of any kind… so i shouldn’t need to set the tablename as a variable

Please read

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=using_recordsets_3.html

For understanding on how QoQ’s work.

I don’t think you understand what a query of queries is. Look at your code-- you have dbtype=“query” inside the query tag. This means that the SQL will NOT be executed against your database, but instead against a resultset variable in memory. That is why it is erroring because you have no result variable called smuser. Andrew gave you a link to the docs for query of queries.

I assume you want to remove the dbtype=“query” from the cfquery tag so it begins hitting the database.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hi Andrew/Brad,
Thanks for your help and clarification.
I thought I understood how QoQ works… but I guess not.
Thanks for all your help.
Derek