Hello!
I would like an aid I am performing queries on a VIAJEM
table where I have 2 fields IDA
E CHEGADA
. Both of type DATE
. I need to query all records for a given MES
.
Ex. ida = '2016-08-15' chegada= '2016-09-01'
. Although the arrival is in September the consultation must bring all the records of the month of August that are registered.
SELECT * FROM viajem WHERE Month(ida) = $mes or Month(chegada)=$mes;
I have to catch the variable via $post
and then replace it with QUERY.