Page 1 of 1

generating customer id's from the database

Posted: Sun Aug 01, 2010 12:52 pm
by heshan
Hi all,

I want some help regarding my banking project. I have a customer registration form in my project.After successfully completion of the form users have to click on the "Open Account" button.Thereafter a customer id(Auto increment value) should be generated.It was stored in the database where other form details are also being stored. How can i call to this one by one customer id's??

Heshan,

Re: generating customer id's from the database

Posted: Sun Aug 01, 2010 3:24 pm
by superdezign
Are you asking how to get the ID of the new customer? After inserting the data, either make use of MySQL's last insert ID (accessible via PHP's mysql_insert_id() function) or, if each user is unique in some way other than their ID, use their unique data to select their row from the database.

Re: generating customer id's from the database

Posted: Sun Aug 01, 2010 9:13 pm
by heshan
@ superdezign,

yeah, i want something that to be happened. Since i am new to php i cannot handle codings properly.Can you please send me the exact coding of this. I mean how the mysql_insert_id() function works?

Heshan,

Re: generating customer id's from the database

Posted: Sun Aug 01, 2010 9:52 pm
by superdezign
heshan wrote:Can you please send me the exact coding of this. I mean how the mysql_insert_id() function works?
Well, that was the initial purpose of providing a link...
If you want your work done for you, you've come to the wrong place. We work for money. ;)

Re: generating customer id's from the database

Posted: Mon Aug 02, 2010 12:55 am
by heshan
It's ok. i will try...... :D