$dbh->mysql_insertid()
Rich Duzenbury wrote: RD: Date: Fri, 14 Dec 2001 14:15:36 -0600 RD: From: Rich Duzenbury <[EMAIL PROTECTED]> RD: To: [EMAIL PROTECTED] RD: Subject: dbi accessor for mysql_insertid RD: RD: Statement handles appear to have an accessor method to return the last RD: insert id: RD: $new_id = $sth->insertid; RD: RD: But I cannot seem to locate one for the database handle. The closest I RD: have found is the RD: $new_id = $dbh->{'mysql_insertid'}; RD: RD: In the case of a $dbh->do(...) where there is no statement handle, I have RD: been using the above. RD: RD: I'm concerned about writing code for the long term that references the RD: internals of an object. Is this guaranteed to stay this way forever? Or, RD: is there an accessor method on the database handle that I am not aware of? RD: RD: Regards, RD: Rich RD: RD: RD: --------------------------------------------------------------------- RD: Before posting, please check: RD: http://www.mysql.com/manual.php (the manual) RD: http://lists.mysql.com/ (the list archive) RD: RD: To request this thread, e-mail <[EMAIL PROTECTED]> RD: To unsubscribe, e-mail <[EMAIL PROTECTED]> RD: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php RD: -- Sherzod Ruzmetov <[EMAIL PROTECTED]> http://www.UltraCgis.com, Consultant 989.774.6265 01001010010000010101000001001100 +----------------------------------------+ | There is nothing wrong with your tools.| | But we can make a better one. | +----------------------------------------+ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php