Hi, I checked the how to, and maybe I just making this harder than it is, but how do I run a simple cgi script from Zope without using Apache? Thanks ahead of time for any help, Luis.
Hi, I'm trying to use a subquery with the following SQL syntax and get an error. SELECT * from return WHERE requestid = ( SELECT requestid from return ORDER BY requestid LIMIT 1 ) Each part of the queary works seperatly but not together. Are their limitation on SQL statements that are allowed ? Using Zope 2.3.0 and PostgresSQL 7.0.3 ZPoPyDA-1.2.tar.gz PoPy-2.0.2.tar.gz Trace follows: ================================================ Error, PoPy.ProgrammingError: ERROR: parser: parse error at or near "order" SQL used: SELECT * from return WHERE requestid=( SELECT requestid from return ORDER BY requestid LIMIT 1 ) Traceback (innermost last): File /sw/scm/usr/var/Zope230/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /sw/scm/usr/var/Zope230/lib/python/ZPublisher/Publish.py, line 187, in publish File /sw/scm/usr/var/Zope230/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: top_1) File /sw/scm/usr/var/Zope230/lib/python/ZPublisher/Publish.py, line 171, in publish File /sw/scm/usr/var/Zope230/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_test) File /sw/scm/usr/var/Zope230/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_test) File /sw/scm/usr/var/Zope230/lib/python/Shared/DC/ZRDB/DA.py, line 396, in manage_test (Object: top_1) File /sw/scm/usr/var/Zope230/lib/python/Shared/DC/ZRDB/DA.py, line 374, in manage_test (Object: top_1) File /sw/scm/usr/var/Zope230/lib/python/Shared/DC/ZRDB/DA.py, line 489, in __call__ (Object: top_1) File /sw/scm/usr/var/Zope230/lib/python/Products/ZPoPyDA/PoPy_db.py, line 95, in query ProgrammingError: (see above)
Lee Marzke wrote:
Hi,
I'm trying to use a subquery with the following SQL syntax and get an error.
SELECT * from return WHERE requestid = ( SELECT requestid from return ORDER BY requestid LIMIT 1 )
Each part of the queary works seperatly but not together. Are their limitation on SQL statements that are allowed ?
Using Zope 2.3.0 and PostgresSQL 7.0.3 ZPoPyDA-1.2.tar.gz PoPy-2.0.2.tar.gz
I'm no MySQL expert, but generally you would use the IN operator when doing subselects. Can MySQL even do subselects?? -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
On Tue, 13 Mar 2001, Casey Duncan wrote:
Using Zope 2.3.0 and PostgresSQL 7.0.3 ZPoPyDA-1.2.tar.gz PoPy-2.0.2.tar.gz
I'm no MySQL expert, but generally you would use the IN operator when doing subselects. Can MySQL even do subselects??
No, but doesn't he say he's using PostgreSQL, which *can* do subselects? Craig Dunigan Web Programmer Esker Software - Extending the Reach of Information mailto://craig.dunigan@esker.com tel 608.273.6000 ext.362 fax 608.273.8227 http://www.esker.com
On Tue, Mar 13, 2001 at 03:14:00PM -0700, Casey Duncan wrote:
Lee Marzke wrote:
Hi,
I'm trying to use a subquery with the following SQL syntax and get an error.
SELECT * from return WHERE requestid = ( SELECT requestid from return ORDER BY requestid LIMIT 1 )
Each part of the queary works seperatly but not together. Are their limitation on SQL statements that are allowed ?
Using Zope 2.3.0 and PostgresSQL 7.0.3 ZPoPyDA-1.2.tar.gz PoPy-2.0.2.tar.gz
I guarantee that (some) subselects can be done with this combo of software, use them all the time. I am a bit concerned about the LIMIT clause in a subselect. Would it not be far easier to say SELECT * FROM return WHERE requestid = ( SELECT min(requestid) FROM return) ? Jim
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On 13-Mar-01 Jim Penny wrote:
On Tue, Mar 13, 2001 at 03:14:00PM -0700, Casey Duncan wrote:
Lee Marzke wrote:
Hi,
I'm trying to use a subquery with the following SQL syntax and get an error.
SELECT * from return WHERE requestid = ( SELECT requestid from return ORDER BY requestid LIMIT 1 )
Each part of the queary works seperatly but not together. Are their limitation on SQL statements that are allowed ?
Using Zope 2.3.0 and PostgresSQL 7.0.3 ZPoPyDA-1.2.tar.gz PoPy-2.0.2.tar.gz
I guarantee that (some) subselects can be done with this combo of software, use them all the time. I am a bit concerned about the LIMIT clause in a subselect.
Would it not be far easier to say
SELECT * FROM return WHERE requestid = ( SELECT min(requestid) FROM return) ?
That works !
I'm no MySQL expert, but generally you would use the IN operator when doing subselects. Can MySQL even do subselects??
Yes, I just switched ( rather painlessly ) from MySQL to PostgreSQL because of random flackness with Solaris-7, Zope-2.3.0, and the MysqlDB products. The new PostgreSQL book by Momjian, ( Addison Wessley ) is great. Lee Marzke <lmarzke@kns.com> 13-Mar-01, 19:10:36 Kulicke & Soffa Industries 2101 Blair Mill Rd +1 215 784-6217 Willow Grove, PA 19090 +1 215 784-6014 fax
Lee Marzke wrote:
Hi,
I'm trying to use a subquery with the following SQL syntax and get an error.
SELECT * from return WHERE requestid = ( SELECT requestid from return ORDER BY requestid LIMIT 1 )
Each part of the queary works seperatly but not together. Are their limitation on SQL statements that are allowed ?
Using Zope 2.3.0 and PostgresSQL 7.0.3 ZPoPyDA-1.2.tar.gz PoPy-2.0.2.tar.gz
Trace follows: ================================================
Error, PoPy.ProgrammingError: ERROR: parser: parse error at or near "order"
SQL used:
SELECT * from return WHERE requestid=( SELECT requestid from return ORDER BY requestid LIMIT 1 )
Traceback (innermost last): File /sw/scm/usr/var/Zope230/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /sw/scm/usr/var/Zope230/lib/python/ZPublisher/Publish.py, line 187, in publish File /sw/scm/usr/var/Zope230/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: top_1) File /sw/scm/usr/var/Zope230/lib/python/ZPublisher/Publish.py, line 171, in publish File /sw/scm/usr/var/Zope230/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_test) File /sw/scm/usr/var/Zope230/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_test) File /sw/scm/usr/var/Zope230/lib/python/Shared/DC/ZRDB/DA.py, line 396, in manage_test (Object: top_1) File /sw/scm/usr/var/Zope230/lib/python/Shared/DC/ZRDB/DA.py, line 374, in manage_test (Object: top_1) File /sw/scm/usr/var/Zope230/lib/python/Shared/DC/ZRDB/DA.py, line 489, in __call__ (Object: top_1) File /sw/scm/usr/var/Zope230/lib/python/Products/ZPoPyDA/PoPy_db.py, line 95, in query ProgrammingError: (see above)
Sorry, I wrongly thought you were using MySQL for some odd reason. Anyhow, I'm a little confused as to what this SQL statement is trying to do. Please explain a bit, it isn't apparent to me from your example SQL code. -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
participants (6)
-
Aaron Straup Cope -
Casey Duncan -
Craig Dunigan -
Jim Penny -
Lee Marzke -
Network Administrator