On May 26, 2006, at 1:08 AM, Josh Mellicker wrote:

Just wondering,

After you execute a revExecuteSQL INSERT, how do you get the auto- incremented record ID MySQL automatically assigned (from within Rev)?

(Rather than doing an inelegant search for the record you just inserted and reading it's ID?)

Try this:

function getLastInsertIDForMySQL pConnID
    put "SELECT LAST_INSERT_ID()" into theSQL
    return revDataFromQuery(,, pConnID, theSQL)
end getLastInsertIDForMySQL


--
Trevor DeVore
Blue Mango Learning Systems - http://www.bluemangolearning.com
[EMAIL PROTECTED]


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to