how do you get the MySQL mysql_insert_id(); from within Rev?

Jan Schenkel janschenkel at
Fri May 26 04:59:16 EDT 2006

--- Josh Mellicker <josh at> 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?)
> Thanks!

Hi Josh,

For a second I thought that the result of
revExecuteSQL might be the ID, but according to the
docs you'll get the number of records affected by your
So it looks like searching your record is the only

Jan Schenkel.

Quartam Reports for Revolution

"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Use-livecode mailing list