DwZone Forum DwZone Forum
Welcome to the DwZone-it Forum
 
  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  
    RegisterRegister -->   LoginLogin  
Advanced Search  
DwZone Forum Index -> Advanced Search

Moderators: AdministratorsModerators 
Hint: For improved responsiveness, use Internet Explorer 4 (or above) with Javascript enabled, choose 'Dynamic' from the View dropdown and hit 'Set Options' to save your changes.
New Topic Search for
 View     Per page     Messages Since 
Messages 191 to 200 of 282 (Total: 122) First |  Prev |  Next |  Last  
 Subject Author Date  
   Re:No result  
View this persons public profile  [email protected]   23:14 21 Feb 2007  
   Re:No result  
View this persons public profile  [email protected]   23:15 21 Feb 2007  
   Re:No result  
View this persons public profile  gianluigi   10:33 22 Feb 2007  
   Re:No result  
View this persons public profile  [email protected]   15:12 22 Feb 2007  
    MYSQL syntax problem  
View this persons public profile  [email protected]   4:21 20 Feb 2007  
 
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
 
Reply to this current thread  View this persons public profile  Send Private Message
   Re:MYSQL syntax problem  
View this persons public profile  [email protected]   4:34 20 Feb 2007  
   Re:MYSQL syntax problem  
View this persons public profile  gianluigi   10:47 20 Feb 2007  
   Problem with date format  
View this persons public profile  [email protected]   3:21 20 Feb 2007  
   Re:Problem with date format  
View this persons public profile  gianluigi   10:50 20 Feb 2007  
   No results  
View this persons public profile  [email protected]   5:13 19 Feb 2007  
Last Visit: Friday 1 Nov, 2024 2:33 pm First |  Prev |  Next |  Last  
 Login
Username:  Password:    
Read Message Read Message   Unread message Unread message
Read message [popular] Read message [popular]   Unread message [popular] Unread message [popular]
Read message [locked] Read message [locked]   Unread message [locked] Unread message [locked]
All times are GMT-1

Jump to: