Search by date range problem
View Single Post
01-09-2009, 01:55 PM
Join Date: Sep 2008
Originally Posted by
I think these articles may help you understand:
Securing your MySQL Queries with Sprintf
How to Login to Any Account on an Insecure Site
Also I advise that you turn error reporting off in a live server environment, don't make the hackers life easy by giving him feedback on his attempts (which in essence is what happens with errors).
Anyway to the problem. Is your database stripping of the preceding zero?, I say this because you are sending both 09 and 08 in the between statement as string (wrapped in single quotes), thus the db will be comparing:
the string "08" and the integer 8
and so on and so forth.
In other words, what's the column's data type? and what does it currently hold
Thanks for the links, I'll read up on those as soon as I can. As for the db, there is a field for date. I guess I should have used the whole thing in my question. The dates are displayed as
Trying to learn all I can about PHP. Teach me what you know...
View Public Profile
Send a private message to code_junkie
Find More Posts by code_junkie