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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Manually create query?

Status
Not open for further replies.

varnix

Programmer
Jan 7, 2002
94
US
I run a query which gets a list of id numbers from a user's settings in the DB at the time of their login.

Each of these id numbers is tied to a different table containing the category name, item name and item description.

We have recently purchased a tag from a vendor which is passed a query name and will display the data for us in an appropriate manner. The tag works great for all of our other queries but can't work with this one since all we have are ID numbers.

Is there a way to manually "create" a query, basically using a CFLOOP to loop through the list of ID's, look up the info for the three items and then "paste" them into a simulated query so that we'll have a query to pass to the tag?

Its a pipe dream, but I'm hoping!

Thanks!
 
Check out the following cf query functions:
QueryNew
QueryAddColumn
QueryAddRow


 
There's also a pretty cool Custom Tag called CF_QUERYSIM that's handy for doing stuff like that.

Behind the scenes, it uses all the same techniques, QueryNew, QueryAddColumn, etc, but upfront it lets you set up a query in a style/syntax that's much easier to read and maintain.

Pretty sure it's still available at Macromedia's developer exchange.



-Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top