ZSQL method LAST_INSERT_ID() error
This ZSQL query: SELECT LAST_INSERT_ID() AS ID Is returning this error: Error, _mysql.OperationalError: (1064, "You have an error in your SQL syntax near 'LIMIT 1000' at line 1") It apparently automatically adds a LIMIT clause to the end of my SQL query that MySQL does not like in this context. Is there any way to shut the limit clause off? Anybody have any ideas for a workaround? P. Johnson
Set the 'Maximum rows to retrieve ' value to zero in the advanced tab of your ZSQL Method. ----- Original Message ----- From: <paul_s_johnson@urscorp.com> To: <zope@zope.org> Sent: Tuesday, March 13, 2001 3:02 PM Subject: [Zope] ZSQL method LAST_INSERT_ID() error
This ZSQL query:
SELECT LAST_INSERT_ID() AS ID
Is returning this error:
Error, _mysql.OperationalError: (1064, "You have an error in your SQL syntax near 'LIMIT 1000' at line 1")
It apparently automatically adds a LIMIT clause to the end of my SQL query that MySQL does not like in this context. Is there any way to shut the limit clause off? Anybody have any ideas for a workaround?
P. Johnson
_______________________________________________ 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 )
http://www.zope.org/Members/adustman/Tips/no_limits On Tue, 13 Mar 2001 paul_s_johnson@urscorp.com wrote:
This ZSQL query:
SELECT LAST_INSERT_ID() AS ID
Is returning this error:
Error, _mysql.OperationalError: (1064, "You have an error in your SQL syntax near 'LIMIT 1000' at line 1")
It apparently automatically adds a LIMIT clause to the end of my SQL query that MySQL does not like in this context. Is there any way to shut the limit clause off? Anybody have any ideas for a workaround?
-- Andy Dustman PGP: 0xC72F3F1D @ .net http://dustman.net/andy "Normally with carbonara you use eggs, but I used lobster brains instead." -- Masahiko Kobe (Iron Chef Italian): 30-year-old Giant Lobster Battle
Hi, Can this be done to a whole folder of sqlstatements at once? Or is this an object specific thing? Paz Andy Dustman wrote:
http://www.zope.org/Members/adustman/Tips/no_limits
On Tue, 13 Mar 2001 paul_s_johnson@urscorp.com wrote:
This ZSQL query:
SELECT LAST_INSERT_ID() AS ID
Is returning this error:
Error, _mysql.OperationalError: (1064, "You have an error in your SQL syntax near 'LIMIT 1000' at line 1")
It apparently automatically adds a LIMIT clause to the end of my SQL query that MySQL does not like in this context. Is there any way to shut the limit clause off? Anybody have any ideas for a workaround?
-- Andy Dustman PGP: 0xC72F3F1D @ .net http://dustman.net/andy "Normally with carbonara you use eggs, but I used lobster brains instead." -- Masahiko Kobe (Iron Chef Italian): 30-year-old Giant Lobster Battle
_______________________________________________ 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 Tue, 13 Mar 2001, Paul Zwarts wrote:
Hi, Can this be done to a whole folder of sqlstatements at once? Or is this an object specific thing?
Paz
Andy Dustman wrote:
It is specific to the Z SQL Method instance. -- Andy Dustman PGP: 0xC72F3F1D @ .net http://dustman.net/andy "Normally with carbonara you use eggs, but I used lobster brains instead." -- Masahiko Kobe (Iron Chef Italian): 30-year-old Giant Lobster Battle
participants (4)
-
Andy Dustman -
Paul Zwarts -
paul_s_johnsonļ¼ urscorp.com -
Phil Harris