1
Hello!
I would like a help I’m performing queries on a table VIAJEM
where I own 2 fields IDA
And CHEGADA
. Both of the kind DATE
. I need to consult all the records of a particular MES
.
Ex. ida = '2016-08-15' chegada= '2016-09-01'
. Although the arrival is in September the consultation should 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 capture the variable via $post
and then replace it in QUERY.
I had to put the WHERE, but my difficulty would be the date selected in the COMBO BOX for the PHP class to put in the query.
– Apolonio Santiago
Click edit your question instead of posting comments. Make a Tour
– Marco Souza
Hello Apolonio, welcome to Stackoverflow. To improve your chances of getting an answer it is always good to include a code example demonstrating the problem. For more information look at How to ask a good question? and How to create a Minimum, Complete and Verifiable example in Help Center.
– Anthony Accioly