Page 1 of 1

Subform SQL error

Posted: Thu Dec 23, 2010 7:52 am
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=

Re: Subform SQL error

Posted: Thu Dec 30, 2010 4:02 am
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