I have the advanced search working okay with a simple record set. SELECT * FROM Tickets
I now need to filter the record set based on a cookie value (strloc3). I change the statement to SELECT * FROM Tickets WHERE Location_Code = '"&strloc3&"' ORDER BY Ticket_No DESC
When I do a search I get the following error:
WARNING!! Error in Advanced Search extension
----------------------------------- SELECT * FROM Tickets WHERE Location_Code = '821' ORDER BY Ticket_No DESC
----------------------------------- SELECT * FROM Tickets WHERE WHERE Location_Code = '821' AND (Registration_No like '%a%') ORDER BY Ticket_No DESC
----------------------------------- [MySQL][ODBC 3.51 Driver][mysqld-5.0.27-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE Location_Code = '821' AND (Registration_No like '%a%') ORDER BY Ticket_N' at line 1
The statement works without any advance search. IE it brings back all the records containing Location_code (strloc3).
Cheers
Stevew |
|
|