List:General Discussion« Previous MessageNext Message »
From:Matthew Stuart Date:February 2 2004 10:46am
Subject:Re: SQL select help required please
View as plain text  
>> 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?
Thread
SQL select help required pleaseMatthew Stuart2 Feb
  • Re: SQL select help required pleaseDaniel Kasak2 Feb
    • Re: SQL select help required pleaseMatthew Stuart2 Feb