Hi Alain,
If I understand your question correctly, I think you might be able to fix this with a subquery. The subquery can be added to your default where clause and check todays date.
The link you added does not work for me. Can you fix that? That might help to get a better understanding of this issue.
Thanks,
Peter
Hello Peter!
Thanks for the fast reply.
The problem is not the “today” criteria. This works fine. So I just removed it to avoid confusion.
My problem is the program = “skk” criteria.
It works in the query builder. Here’s the query:
SELECT kwc_entries.entid, kwc_customers.fname, kwc_entries.enttimestamp, kwc_customers.program
FROM kwc_customers LEFT JOIN kwc_entries ON kwc_customers.myid = kwc_entries.cusid
WHERE (kwc_customers.program)=”skk”
But I need this to display on a page at the front end.
The testing front page is : https://kempocan.com/whitecrane/entries-of-skk/
Again thanks.
Alain Martel
Hi Alain,
One way to solve this issue is to create a view for your query like this:
CREATE VIEW skk_view AS
SELECT kwc_entries.entid, kwc_customers.fname, kwc_entries.enttimestamp, kwc_customers.program
FROM kwc_customers LEFT JOIN kwc_entries ON kwc_customers.myid = kwc_entries.cusid
WHERE (kwc_customers.program)= 'skk'
You can execute the create view statement in the Query Builder. After creating view skk_view you can use it in a publication and add your publication to the front end with a shortcode. You can use views in the Data Publication just like tables.
Does this help?
Peter
Hi Peter.
This helps allot! It works great and will give me allot of usefull options 🙂
I’m impressed by your service and your plugin.
Many thanks!!!
With high regards,
Alain Martel