[Zope] Something funny about SQL like?

Donald Holten donner@biophysics.lanl.gov
Mon, 2 Aug 1999 14:30:02 -0600 (MDT)


	I have the following:
	select *
          from Users
          where <!--#var searchkey--> like "%<!--#var valuekey-->%"
        order by <!--#var searchkey-->
        
        I get:
       Error, exceptions.SyntaxError: unexpected token sequence.near :: 'where 
firstname'*' like "%Donald%'
******************************* current state = 45 expects: ',', 'UNION', 
'FLOAT', 'GROUP',
'VARCHAR', 'DESC', 'SELECT', 'ORDER', 'WHERE', 'AS', 'IN', 'INTERSECT', 'ASC', 
'*', '+', '(', ')', '.',
'/', 'EXCEPT', '-', 'AND', 'FROM', '*', ';', 'INTEGER', 'NOT', '>', 'OR', '=', 
'BETWEEN', 'HAVING', '<',
'VALUES', ('nomatch1',) current token = ((-8, 'user_defined_name'), 'LIKE') 

SQL used:

select *
  from Users
  where firstname like "%Donald%"
order by firstname
  
  	The SQL used looks fine to me.  Anyone see any problems with this code?
  	Thanks!
  	Donner