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

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


--- Josh Mellicker <josh at dvcreators.net> 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
query.
So it looks like searching your record is the only
option.

Jan Schenkel.

Quartam Reports for Revolution
<http://www.quartam.com>

=====
"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 
http://mail.yahoo.com 



More information about the use-livecode mailing list