Custom Import Script (custnum)

Wes Weems wweems at fix.net
Fri May 18 15:52:06 PDT 2001


Ok,

A little history, I work for an existing ISP using some fairly decrepid
accounting software. We've FINALLY decided to move away from that, to
something much better (kudos to ivan). Between my co-workers, and I, we've
come up with a script that will insert the services (more or less what the
import script Ivan wrote that parses up the passwd file). In addition to
that, we've got it pulling name/address/billing info, and are ready to
insert that into cust_main. My question is this:

I dont wanna corrupt data... and I can see custnum is a pkey, however, as
I've noticed as per the database itself, there is no auto incrementation. I
wanted to loop through this list inserting data into cust_main inserting
data.

I looked at Record.pm and cust_main.cgi, but as of yet, I havent seen where
the actual sql statements are issued for that (to see how ivan accomplished
this feat). I suspect its using a nextval statement, but as I said, I'd like
to avoid corruption as much as possible.

THanks so much
Wes Weems

Network Operations Engineer
The Fix Network.




More information about the freeside-users mailing list