[Zope-dev] SQL methods q:
Jordan B. Baker
jbb@spyderlab.com
Fri, 5 Mar 1999 12:11:02 -0500 (EST)
Hi guys:
I'm trying to write a SQL method though, and its giving me an error when I
try to test it..
Error, exceptions.TypeError: keyword parameter redefined
SQL used:
Could not render the query template!
The query I was using:
SELECT searches.engineID as engine,
queries.param as query,
MAX(searches.timestamp) AS time,
searches.position AS position,
MIN(lastsearch.timestamp) AS lastupdate,
lastsearch.position AS lastsearch,
searches.URL as URL,
'NA' as change,
engines.graphic as engine_gfx
FROM searches LEFT JOIN searches as lastsearch USING (queryID,engineID), engines, queries
WHERE lastsearch.timestamp BETWEEN <!--#sqlvar pstart type=int --> AND <!--#sqlvar pend type=int -->
AND searches.timestamp BETWEEN <!--#sqlvar pstart type=int --> AND <!--#sqlvar pend type=int -->
AND queries.clientID = <!--#sqlvar client type=int -->
AND queries.queryID = searches.queryID
AND engines.engineID = searches.engineID
AND searches.timestamp != lastsearch.timestamp
GROUP BY searches.engineID, searches.queryID
ORDER BY searches.engineID ASC, searches.queryID ASC, searches.timestamp ASC, lastsearch.timestamp DESC
;
Any ideas what I could be doing wrong?
BTW, Zope is great! I've been kinda messing around with it for a while, also
checking out PHP3 and other UNIX-based scripting languages and I've very impressed.
TIA,
-jordan.