Forums

Trouble using DB read

Nielsterp 23 Apr, 2017
Hi,
I'm having a form where people can sign up for events. I have a DB read action, that reads the events from a DB table, and the user is supposed to choose the event to sign up for from a drop-down list that is populated by the DB read action.

The DB read is set up as follows:

Action label: read_db
Enabled: Yes
Table name: uq3n7_jevents_vevdetail
Multi read: Yes
Enable Model ID: Yes
Model ID: Data3
Fields: summary, dtstart
Order: dtstart
Group: Blank
Conditions: Blank so far

This gives a full list to select from. However, I want only future events to be shown. The SQL for this is

SELECT summary
FROM uq3n7_jevents_vevdetail
WHERE dtstart > UNIX_TIMESTAMP()

My question is, how do I put the WHERE clause into the conditions box (if this is the right box for a WHERE-clause) ?
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger