I am having a serious issue I can not figure out. I am trying to return rows from MySQL database that have a Start date between two given dates and an End date as well. Here is my php code to query the database:
$getRooms = mysql_query("
SELECT *
FROM Tarifas
WHERE Start BETWEEN '2013-01-10' AND '2013-01-13'
AND End BETWEEN '2013-01-10' AND '2013-01-13'
");
Start and End are set up as DATE fields
my database is set up as follows:
ID | RoomId | Start | End
--------------------------------------
4 | 34562 | 2013-01-09 | 2013-10-23
If anyone can help me figure out why this is not working, it would be greatly appreciated!!