Well if that's the case, all you have to do is push the $from_date back 1 and $to_date forwards one, mktime() should be ablt to do this for you i believe.
That'd be my round about way of doing it anyway.
__________________ A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill
Please visit my sites: Please login or register to view this content. Registration is FREE | Please login or register to view this content. Registration is FREE
Using the timestamp function will work, but provided the variables $from_date and $to_date are in the same format as the "date" column in the db table, it would mean unnecessary coding.
It all depends on the set up of the db table.
__________________ Found this useful? - HIT MY TALKUPATION!
The email notification system didn't work and i thought that i had become hugely unpopular here and that no-one wanted to help. But all the contributions guided me towards finding/solving the problem.
The problem:
Upon investigation, i realised that `date` was a datetime. This meant that when i was searching dates without times. This meant that time was taken to be 00:00:00 and that is midnight of the previous night, hence the reason why end_date was not being included (except for transactions that may have taken place at midnight the previous night).
The solution:
By adding the time 23:59:59 (denoting the end of the day) to the end_date, the whole of end_date was included.