Hi all,

I've created a page that consumes an Excel spreadsheet, loops over the rows, 
and dynamically creates a pre-populated form. The idea being that folks 
inputting data have an intermediate step to clean up the data before inserting 
it into the DB.

That all works just fine. When I POST the form to my 'insert' page, I then have 
to loop over the multiple form records, see if the certification number exists 
for each student entered, and then if they exist I only insert the course 
instance to the course table (and the lookup table between the student and 
course), but if they don't exist then I insert both the course record and the 
new student into the student table.

All of the queries work fine independently, and all of my dumped data is 
acceptable. The problem that I CAN NOT figure out is that CF is spitting out an 
error that states: "Error Executing Database Query. Can not issue empty query." 
I'm stumped.

If I remove the loop, or move it outside the query, the error still persists, 
but it's on a query that should be skipped via my CFIF statement. Example: if 
the student DOES exist and I'm only inserting the course, it shows the error to 
be attributed to the other portion of the CFIF, where it inserts both the 
student AND course.

I'm using CF9 (local development) along with MySQL 5.5.8 and I can't figure 
this out. Thanks in advance if you've read this far.
-TC 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342073
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to