Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Subform SQL error

Post Reply
JeffTaylor
Posts: 11
Joined: Tue Sep 21, 2010 3:21 am

Subform SQL error

Unread post by JeffTaylor »

Hey guys, using a subform which is coming up with an error in background on saving. Works fine if I remove the 'AND trs_date > CURDATE()'... is it possible it doesn't like saving the CURDATE() part, and is there an alternative I can use if this is the case?
trs_date is a date field.

SELECT *
FROM training_session
WHERE trs_venue_id ='#id#'
AND trs_date > CURDATE()
ORDER BY trs_date ASC

Error is: Webpage error details

Message: Object required
Line: 52
Char: 8
Code: 0
URI: /productionnu2/formduplicate.php?x=1&r=14d12d0f8c84fb&dir=db/safepla1_safeplace&ses=14d12effa92430&f=14d081c1799bf5&form_ses=14d12f08f09ce8&debug=
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Subform SQL error

Unread post by admin »

Jeff,

I tried
SELECT * FROM transaction_item
INNER JOIN product ON product_id = tri_product_id
WHERE tri_transaction_id = '#id#'
AND tri_paying_invoice_id IS NULL
AND tri_date < CURDATE()

in a subform which works fine.

Maybe remove the objects in the subform 1 by 1, to see if the problem isn't in one of the objects.

Steven
Post Reply