[ale] Getting the next index of a table in mysql
Michael B. Trausch
fd0man at gmail.com
Thu Jun 9 09:59:39 EDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Chris Fowler wrote:
>
> This might be the best way but how do I do this? "select serial_no from
> table_533 where ....."
>
I'm not personally sure in Perl, but in PHP, you can do the following:
$result = mysql_query("INSERT INTO xxxyyy (id, hihi) VALUES ('', 'hihi')");
$rowId = mysql_insert_id($result);
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCqEjHPXInbkqM7nwRAz0nAKCUpRRfjSFE8N5iMqYOKQLkPSCpHwCdEZkt
KXxQX0ukUg034Bn1OaPWEss=
=0mKm
-----END PGP SIGNATURE-----
More information about the Ale
mailing list