[Zope] ZSQL retreive auto_increment id inserted [Q]

Bruno Mattarollo brunomadv@ciudad.com.ar
Tue, 9 Nov 1999 06:05:14 -0300


This is a multi-part message in MIME format.

------=_NextPart_000_001A_01BF2A78.63D1D000
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello.

    I have just a simple question... I am using Zope 2.0.1 on a Solaris =
Sparc machine. MySQL 3.22.25 and MySQLdb 0.1.1 ... Everything works =
fine...

    I have a table that has a field that is an integer auto_increment =
... How do I retreive the id just inserted? I mean, when I used the =
MySQLmodule, directly from Python, there was a method to do just that... =
Can I do this using a method from the ZSQL? I checked the ZQR but found =
no such method ...

    TIA

/B

Bruno Mattarollo <brunomadv@ciudad.com.ar>
--- Python Powered <http://www.python.org/psa/>


------=_NextPart_000_001A_01BF2A78.63D1D000
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3401" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>Hello.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; I have&nbsp;just a simple question... I am using =
Zope=20
2.0.1 on a Solaris Sparc machine. MySQL 3.22.25 and MySQLdb 0.1.1 ... =
Everything=20
works fine...</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; I have a table that has a field that is an =
integer=20
auto_increment ... How do I retreive the id just inserted? I mean, when =
I used=20
the MySQLmodule, directly from Python, there was a method to do just =
that... Can=20
I do this using a method from the ZSQL? I checked the ZQR but found no =
such=20
method ...</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; TIA</DIV>
<DIV>&nbsp;</DIV>
<DIV>/B</DIV>
<DIV>&nbsp;</DIV>
<DIV>Bruno Mattarollo &lt;brunomadv@ciudad.com.ar&gt;<BR>--- Python =
Powered=20
&lt;<A=20
href=3D"http://www.python.org/psa/">http://www.python.org/psa/</A>&gt;</D=
IV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_001A_01BF2A78.63D1D000--