Hi folks, I'm 3 days before rollout of my first Zope project and now discover my ZSQL / Z Search Interface yields wrong query results! Only the first 20 query results are o.k., navigating around with next/previous "forgets" the user search form inputs constructing the SQL WHERE clause. Details: 1. I Use Zope 2.6.0 with python 2.1.3 and mysql 3.23-48. 2. First I created a zsql method: select * from usertable <dtml-sqlgroup where> <dtml-sqltest Userid op=like type=nb optional> <dtml-and> <dtml-sqltest Nachname op=like type=nb optional> <dtml-and> <dtml-sqltest Vorname op=like type=nb optional> </dtml-sqlgroup> 3. Then I added an Z Search Interface, which produced the following page templates: ########################################################## ... <form action="fp1b" method="get"> <h2 tal:content="template/title_or_id">Title</h2> Enter query parameters:<br><table> <tr><th>Userid</th> <td><input name="Userid" width=30 value=""></td></tr> <tr><th>Nachname</th> <td><input name="Nachname" width=30 value=""></td></tr> <tr><th>Vorname</th> <td><input name="Vorname" width=30 value=""></td></tr> <tr><td colspan=2 align=center> <input type="SUBMIT" name="SUBMIT" value="Submit Query"> ... ########################################################## ... <body tal:define="results here/fp1user_query_sqlmethode_argu; start request/start|python:0; batch python:modules['ZTUtils'].Batch(results, size=20, start=start); previous python:batch.previous; next python:batch.next"> <p> <a tal:condition="previous" tal:attributes="href string:${request/URL0}?start:int=${previous/first}" href="previous_url">previous <span tal:replace="previous/length">20</span> results</a> <a tal:condition="next" tal:attributes="href string:${request/URL0}?start:int=${next/first}" href="next_url">next <span tal:replace="next/length">20</span> results</a> </p> <table border> <tr> <th>Userid</th> <th>Vorname</th> <th>Nachname</th> </tr> <div tal:repeat="result batch" > <tr> <td><span tal:replace="result/Userid">Userid goes here</span></td> <td><span tal:replace="result/Vorname">Vorname goes here</span></td> <td><span tal:replace="result/Nachname">Nachname goes here</span></td> </tr> ... <a tal:condition="previous" tal:attributes="href string:${request/URL0}?start:int=${previous/first}" href="previous_url">previous <span tal:replace="previous/length">20</span> results</a> <a tal:condition="next" tal:attributes="href string:${request/URL0}?start:int=${next/first}" href="next_url">next <span tal:replace="next/length">20</span> results</a> </p> ... ######################################################### 4. A direct test of the ZSQL in the test tab works perfectly, e.g. searching all userids starting with C produces 20 results, you click "next 20 results" and get the next 20 hits and so on. 5. When using the Zope-generated Z Search page templates, you can also choose your query parameter C% and get the first 20 hits correctly. BUT: IF YOU NOW PRESS NEXT 20 RESULTS, YOU GET THE 20 VERY FIRST ROWS OF THE WHOLE TABLE! 6. A MySql Trace shows that the first query is SELECT * FROM usertable WHERE userid LIKE C%; this is fine clicking the "next url" yields another query with SELECT * FROM usertable; 7. Obviously something must be wrong with the "next url": <a tal:condition="next" tal:attributes="href string:${request/URL0}?start:int=${next/first}" It does not know about the SQL query parameters from the first call!? 8. Any ideas how to navigate correctly through this ZSQL result ? When I compare to the ZSQL test tab, there a much longer url is composed when going to the "next 20 results" link. Regards Peter __________________________________________________________________ Tiscali Mobile NEU! Die neuesten Klingeltöne, Logos, Mailboxsprüche, Bildmitteilungen und Screensaver für alle Handytypen. Einfach und günstig! Klicken Sie hier: http://www.tiscali.de/mobile/