datepicker date query

0

Good afternoon guys. How do I display data from the database through the date selected in datepicker? How should the select be used in this case? since it is the user who will choose the date to display the data.

    
asked by anonymous 10.03.2018 / 19:57

1 answer

0

I would make a SELECT so for fields with column date or datetime:

SELECT * FROM tabela WHERE DATE_FORMAT(coluna_data, '%d/%m/%Y') = $data

DATE_FORMAT to format in the same pattern that comes from JQuery and $data is what the user sent at a glance here to see more date formats

    
10.03.2018 / 20:55