Question: Getting back what I just did... PHP_MySQL

    Date: 05/10/06 (PHP Community)    Keywords: mysql, sql

    Hello all. I hope this isn't too Newbie-ish.

    I have a table in MySQL called "Entity" that has the following columns:

    Entity_UID - int 50 Not Null Auto Inc
    foo - date
    recordCreated - dateTime

    So the question is: if I do:

    $query = "INSERT INTO Entity VALUES (NULL, '2005-12-25', NOW())";

    $result = mysql_query($query);

    What is the easiest way to get back the Entity_UID of the record I just created?

    Source: http://community.livejournal.com/php/449188.html

« get username from .htaccess... || Difficulties... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home