[ic] Re: record created, but cant retrieve autonumber value on next page
interchange-users@icdevgroup.org
interchange-users@icdevgroup.org
Fri Aug 23 10:01:13 2002
Aaron Hazelton writes:
[..]
>
> I really don't know much about perl, I just knew enough to copy
> it from the admin UI page that allows creation of a new db record
> from a form. I copied the code exactly and just changed the table
> name in the code.
>
> This is my first attempt at a totally user-manipulatable db from html
> forms and using the autonumber feature... so im kind of confused.
Sounds very insecure :-(
You can try set_slice, which works automagically on AUTO_SEQUENCE
databases.
[perl tables=havoc]
$Scratch->{new_id} = $Db{havoc}->set_slice('', ['field1', 'field2'],
[$CGI->{field1},$CGI->{field2}]);
return;
[/perl]
New id is [scratch new_id]
Ciao
Racke
>
> any other ideas?
> thanks!
>
>>
>> --
>> _/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
>> _/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n
>> W a l s h
>> _/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
>> _/ _/ _/_/_/_/ _/ _/_/_/ _/ _/
>>
> _____
>
> Sincerely,
> Aaron Hazelton
>>>Hazenet<<
> aaron@hazenet.net
>
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>
--
Prolific Interchange Consulting (Excellent German Quality !).
Take a look at Materialboerse (http://www.materialboerse.de/), WITT
(http://www.witt-weiden.de/), Boxmover (http://shop.boxmover.ch/) or
Passionshop (http://www.passionshop.com/racke). Need a shop ? Contact us.