This topic is locked
[SOLVED]

Default between search

11/17/2021 12:09:13 PM
PHPRunner General questions
L
luchoadmin author

Hello dears,

I need your help, put together a dashboard in which to place a graphic with your search field, this is reflected in the "original print" image. the graph has the following mysql query
SELECT
Date,
Boat,
Kilograms
FROM income

where the Date field is with which you can perform searches.
but it shows me a lot of data by default, what I was trying to do without positive results, is that by default it shows the last two weeks but that if a particular date is searched for, the search can be carried out. does anyone have any ideas?

from mysql probe use this,
WHERE (DATE_SUB (CURDATE (), INTERVAL 2 week) <= Date)
but then it does not allow me to search in another date range.

thank you !!!!!

img alt

img alt

admin 11/17/2021

I think you can use PHPRunner's Search API for this purpose.

You can use searchStarted() function to see if the search was started and if it is not then you can add the default WHERE search clause.

L
luchoadmin author 11/21/2021

thank you!! its worked ok!!