Menu
Hello
I am using the following code:
[COLOR=”red”]$query = “SELECT * FROM tblONE WHERE ‘%”.$SecondDate.”%’> TDate > ‘%”.$FirstDate.”%’ ORDER BY TId DESC”;
To search a MySQL database. TDate is Timestamp(8). So it shows the date like this:
[COLOR=”red”]22.01.2007 >>> 20070122
[COLOR=”Red”]$FirstDate and $SecondDate are two variables that set my desired date range.
So I want to find all the record with TDate that fall between these two dates.
[B]I am getting wrong answers is some cases!
What am I doing wrong?