I am trying to create a html search results page with the following:

SELECT *
FROM tbl_allarticles
WHERE (fld_headline LIKE'%userinput%' OR fld_summary LIKE'%userinput%' OR fld_body LIKE'%userinput%') AND fld_category LIKE 'catvalue'


The above works fine, but the below code is giving me some jip… (It is simply a command to look for dates between user inputted start and end dates, but it is not working) it just follows on from the above code:

AND fld_reldate BETWEEN 'startdatevalue' AND 'enddatevalue'

What problem are you having exactly? An error, or just not getting the results you expected?
Maybe you need to format the date in yyyymmdd format before giving it to MySQL.



The problem I am having is that I am getting a Data type mismatch in criteria expression error.


The way I understand this to work is the quotes around the start and end date values make these values variables which will be issued at runtime by the user when submitting the form on the previous page. Is that right?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to