How to select MySQL data between 2 different dates? I have inserted date in the format dd-mm-yyyy. Here is the query I’m using:
SELECT * FROM `entries` WHERE `date` BETWEEN ’01-04-2014′ AND ’30-04-2014′
This table ‘entries’ contain id, date, particulars, debit, credit and link. I have retrieved the last six months using PHP because I want to know the total of debit and credit for each month. But whenever I run this query, it returns the total of all debit entries and credit entries whether they belong to the specified date range or not.