Database Query

Asked by Barry Wood

Hi,

I have a Calendar database that shows events every day. I can load this into a Xibo dataset with no problem and it displays fine.

However, what I really want is just to show events for the current day (or maybe the next 2 or 3 days). Is it possible to set a query on the dataset to just display the events for today, so that each day only those events are displayed? I see a 'filter' button, but am not sure what code can be inserted in there.

This would really help otherwise it means manually changing the display every day - something that won't happen asit's too laborious.

Question information

Language:
English Edit question
Status:
Answered
For:
Xibo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alex Harrington (alexharrington) said :
#1

I think the following will work in filter

DATE(ColumnName) = DATE(NOW())

Revision history for this message
Alex Harrington (alexharrington) said :
#2

Actually just tried it and it doesn't.

I _thought_ I read somewhere a code diff that said this was possible but I can't find it quickly now. Hopefully Dan will have some idea.

Revision history for this message
Barry Wood (barry-x8) said :
#3

Actually that code might work if I had a column with a proper date value in it but I don't. I'll add a date field and test. If that 'filter' field can take normal SQL query commands then that is fine I can construct and test myself. I also need to work out how to quickly update the table with calendar entries if they change during the year.

Revision history for this message
Dan Garner (dangarner) said :
#4

There is a bug here for this extra functionality (MySQL syntax in filter)
https://bugs.launchpad.net/xibo/+bug/1133043

Can you help with this problem?

Provide an answer of your own, or ask Barry Wood for more information if necessary.

To post a message you must log in.