Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

viewing sql statement 2

Status
Not open for further replies.

aminahbt

Programmer
Jan 1, 2001
7
SG
Hi,
I am writing a search engine based on multiple criteria. The <cfquery></cfquery> tag is written with numerous <cfif> checks in between before the full sql statment is constructed.

I need to see the resultant sql statement that is formed in order to debug. How do I output this statement in coldfusion?

Can anyone please help.

regards,
a.h.
 
In the CF administrator; turn on the debugging output
debugging > Show query information.

The query information will be displayed at the bottom of your page.

webron.
 
hi aminahbt

CF admin is good. You can also add the word DEBUG to any <CFQUERY> tag.

If I remember correctly, this only works on NT.

Has anyone had success with this attribute on Linux?
 
Hi webron and strantheman,

thanks for your prompt help.

Both methods worked. Just for future use,
not urgent, would you also know how to output
a valid sql statement?

Just asking :)

Thanks,
a.h.

 
Hi aminahbt

Mmmm, im not sure what you mean. CF will give you error information - it will even take a guess at the line number the error is near, but it can't solve equations for you.

What do you mean by valid sql statement ? What output were you looking for?

hope we can help
 
Oh, my mistake.

I was assuming that the sql statement in a particular page would only appear when it is incorrectly written.

However, I realised that the sql statement written correctly or not appears anyway once the show information is turned on in CF admin.

Thanks again for the help.

-a.h.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top