Re: [Zope] Problem using dtml-in in ZSQL method
Trying : select * from mytable <sqltest mylist multiple type=int column=id> did not work, it generates a ProgrammingError - Module Shared.DC.ZRDB.DA, line 374, in __call__ - Module Products.ZMySQLDA.db, line 273, in query ProgrammingError: (1064, "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 '<sqltest mylist multiple type=int column=id> LIMIT 1000'") My problem was that I tried to test my Z SQL method through the ZMI, testing with a python script worked fine with the following Z SQL method : SELECT * FROM MyTable <dtml-sqlgroup where> <dtml-sqltest mylist column=id type=int multiple> </dtml-sqlgroup> I also modified the "mylist" parameter declaration to specify that it is a list of integers which is set to none if no parameter is passed. liste:list:int=none Thanks for your reply
+-------[ Fran?oise CONIL ]---------------------- | Trying : | | select * from mytable <sqltest mylist multiple type=int column=id> select * from mytable WHERE <sqltest mylist multiple type=int column=id> ^^^^^ Missed a where statement... | Thanks for your reply No problem. -- Andrew Milton akm@theinternet.com.au
You're right but even with a WHERE statement I get the same programming error, I have to use the dtml-sqlgroup statement Françoise 2008/12/12 Andrew Milton <akm@theinternet.com.au>
+-------[ Fran?oise CONIL ]---------------------- | Trying : | | select * from mytable <sqltest mylist multiple type=int column=id>
select * from mytable WHERE <sqltest mylist multiple type=int column=id> ^^^^^
Missed a where statement...
| Thanks for your reply
No problem.
-- Andrew Milton akm@theinternet.com.au
participants (2)
-
Andrew Milton -
Françoise CONIL