You aren't having to worry about this. last_insert_id is per connection, and not confused by activitiy across connections. Otherwise, mySQL is decidely non-transactional. postgresql has that.
------------ Original Message ----------- From: Gustavo Vieira Goncalves Coelho Rios <gustavo@ifour.com.br> Date: Thu, 26 Jul 2001 15:26:02 -0300
Hi folks!
I have a table it has an auto increment fields. How could i have the id id insert by my last query atomically? I know i could use last_insert_id() function with MySQL, but since my mysql handler is shared by many instances of Zope, i cannot garantee that no other query runs between the insert and the select last_insert_id queries.
Any ideia ?
-- There is only one thing in the world worse than being talked about, and that is not being talked about. -- Oscar Wilde
_______________________________________________ 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 )
You aren't having to worry about this. last_insert_id is per connection, and not confused by activitiy across connections. Otherwise, mySQL is decidely non-transactional. postgresql has that.
This may be way beside any point made in this thread, but: nope. As of version 3.23.x, MySQL implements transactions. /Danni
Is it possible to use PHP with Zope, instead of Python or Perl ? if so, does anyone know of any resources I can check out ? Thanks, Jerry Lake Interface Engineering Technician Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com
Hi Jerry, may be someone has written something like that. To be frank, I would not recommend it. Learning python isn't really so hard and you will see how easy some things are if you get used to it. You will then ask yourself, what the hell did you do with this PHP thingy ;) The other reason why people want this is to be able to drop ready solutions into their site. I would not recommend this either, because zope is very different and either is does not work at all or is very inefficient. I would recommend to reintegrate it in the zope way. During this time you could configure Apache to render all the PHP resources for you while all other pages are rendered by zope. (There is a howto somewhere on zope.org) Regards Tino --On Donnerstag, 26. Juli 2001 13:45 -0700 Jerry Lake <jerryl@europa.com> wrote:
Is it possible to use PHP with Zope, instead of Python or Perl ? if so, does anyone know of any resources I can check out ?
Thanks,
Jerry Lake Interface Engineering Technician Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com
_______________________________________________ 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 )
Why would you want to use PHP instead of Python? Are you just computer-curious or is there a technical or sociological reason? If you know PHP, you'll learn both Python AND more things to do in a day or two. PHP is in no way comparable to Python in the sense of scripting tool for Zope. The only thing PHP is better than Python is when it's got nothing to do with Zope. Don't be afraid of the snake. It's very easy to learn. Peter ----- Original Message ----- From: "Jerry Lake" <jerryl@europa.com> To: <zope@zope.org> Sent: Thursday, July 26, 2001 10:45 PM Subject: [Zope] Zope & Php
Is it possible to use PHP with Zope, instead of Python or Perl ? if so, does anyone know of any resources I can check out ?
Thanks,
Jerry Lake Interface Engineering Technician Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com
_______________________________________________ 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 )
participants (6)
-
Danni Efraim -
Dieter Maurer -
Jerry Lake -
Peter Bengtsson -
rlanham@speakeasy.net -
Tino Wildenhain