[freeside] More questions regardign FS::cust_main

ivan ivan at 420.am
Mon May 21 22:49:13 PDT 2001


Yes, after you insert a record, the primary key will be available.

$error = $cust_main_record->insert;
die $error if $error;
$custnum = $cust_main->custnum;

On Mon, May 21, 2001 at 10:45:36PM -0700, wes weems wrote:
> I got customers successfully being added.... and I know with many
> languages... you can get an "insert id" (ie custnum is returned after
> inserting the record) I wanted this because I have a list of previous
> balances too... and if I could have the customer insert work I could then
> insert into the correct table, the owed dollar amount for that particular
> custnum. If this wont work I suppose that ok... I just wanna try and avoid
> having to do any work that could be donw with scripting =)
> 
> Thanks everyone!
> Wes
> 

-- 
meow
_ivan



More information about the freeside-users mailing list