DBI Version: 1.19
DBD::mysql Version: 2.0416



Rich Duzenbury wrote:

    RD: Date: Fri, 14 Dec 2001 19:45:02 -0600
    RD: From: Rich Duzenbury <[EMAIL PROTECTED]>
    RD: To: sherzodR <[EMAIL PROTECTED]>
    RD: Cc: [EMAIL PROTECTED]
    RD: Subject: Re: dbi accessor for mysql_insertid
    RD:
    RD: DBI version 1.15
    RD: DBD::mysql version 2.0416
    RD:
    RD: Blows up on trying to use $dbh->mysql_insertid():
    RD: Can't locate object method "mysql_insertid" via package "DBI::db" (perhaps
    RD: you forgot to load "DBI::db"?
    RD:
    RD: Would you mind telling me what version you are running?  Thank you.
    RD:
    RD: Regards,
    RD: Rich
    RD:
    RD:
    RD: At 03:36 PM 12/14/01, sherzodR wrote:
    RD:
    RD: >$dbh->mysql_insertid()
    RD: >
    RD: >
    RD: >
    RD: >Rich Duzenbury wrote:
    RD: >
    RD: >     RD: Date: Fri, 14 Dec 2001 14:15:36 -0600
    RD: >     RD: From: Rich Duzenbury <[EMAIL PROTECTED]>
    RD: >     RD: To: [EMAIL PROTECTED]
    RD: >     RD: Subject: dbi accessor for mysql_insertid
    RD: >     RD:
    RD: >     RD: Statement handles appear to have an accessor method to return the
    RD: > last
    RD: >     RD: insert id:
    RD: >     RD: $new_id = $sth->insertid;
    RD: >     RD:
    RD: >     RD: But I cannot seem to locate one for the database handle.  The
    RD: > closest I
    RD: >     RD: have found is the
    RD: >     RD: $new_id = $dbh->{'mysql_insertid'};
    RD: >     RD:
    RD: >     RD: In the case of a $dbh->do(...) where there is no statement
    RD: > handle, I have
    RD: >     RD: been using the above.
    RD: >     RD:
    RD: >     RD: I'm concerned about writing code for the long term that
    RD: > references the
    RD: >     RD: internals of an object.  Is this guaranteed to stay this way
    RD: > forever?  Or,
    RD: >     RD: is there an accessor method on the database handle that I am not
    RD: > aware of?
    RD: >     RD:
    RD: >     RD: Regards,
    RD: >     RD: Rich
    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

Reply via email to