Thanks for your help so far. Anthony Geoghegan was very helpful steering
me in the right direction. I am trying to use a subquery in combination
with a session variable to keep track of a customer's choices of malas
(worry beads) on a web site that I would someday like to put on line. I
guess it is a crude shopping cart. Anyway, I'll deal with the session
variable stuff later. Right now I'm having trouble with the subquery. I
am using two simple tables filled with a bunch of dummy values (maybe
that's part of my problem). A file called mqapp_our_select.cfm located
at http://www.digitalnature.net/hameed/mqapp_our_select.cfm is supposed
to display a selection of wonderful malas. Right now the gifs are
colored squares. When you click on one of them, you invoke the next
template called mqapp_our_list.cfm. The query looks like this:
<CFQUERY DATASOURCE="data" NAME="mq_our">
SELECT prod_num,bead
FROM mq_our
WHERE malaID IN (SELECT malaID FROM sessions
WHERE session=#session_name#)
ORDER BY prod_num
</CFQUERY>
Instead of a session variable for now (to keep things simple) I'm just
using a string: abc. In the second table called sessions I have some
instances where abc appears in the session column. I want the query to
pull the corresponding "malaID's" from the sessions table and use them
in the mq_our table. But I get an error:
ODBC Error Code = 07001 (Wrong number of parameters)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
1.
HELP! What am I doing wrong?
For completeness the full error code can be viewed at
http://www.digitalnature.net/hameed/error.txt. The application file can
be viewed at http://www.digitalnature.net/hameed/application.txt. The
code for mqapp_our_select.cfm can be viewed at
http://www.digitalnature.net/hameed/mqapp_our_select.txt. The code for
mqapp_our_list.cfm can be viewed at
http://www.digitalnature.net/hameed/mqapp_our_list.txt. The mq_our table
can be viewed at http://www.digitalnature.net/hameed/mq_our_1.html. And
the sessions table can be viewed at
http://www.digitalnature.net/hameed/sessions_1.html.
If you see anything else in all that code that needs fixing please let
me know!
Thank you, kind people of cf-talk for any help you can offer!
Megan
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.