Login
Register
Close
Articles
Technology News
All Articles
Submit Guest Post
Tools & Utilities
Code Converter
Forum
Learn
Tutorials
Interview Experience
Practice Tests
Freelancers
Services
Software Development
SEO & Digital Marketing
IT Companies
Login
Register
Articles
Technology News
All Articles
Submit Guest Post
Tools & Utilities
Code Converter
Forum
Learn
Tutorials
Interview Experience
Practice Tests
Freelancers
Services
Software Development
SEO & Digital Marketing
IT Companies
Discussion Forums
.NET
HTML
You must
Sign In
to post a response.
Category:
HTML
16 Jul 2014 23:56
Nepolian
Joined:
19/02/2008
Level:
Silver
Points:
363
Points:
2
Auto Id Generation with text in php
Friends,
I am developing my site in html with php,mysql. i want to create ID auto increment like this CUS1,CUS2,CUS3....CUS100. How to create auto ID generation in php?
#747556
17 Jul 2014 04:12
Suresh
Joined:
06/07/2011
Level:
Gold
Points:
2388
Points:
2
Hi,
I don't have knowledge in PHP, so i telling step by step.
1. First you count records from table (Database)
2. assign the counting records to local variable (i)
3. check the variable (i) have value
4. if i is 0
string autoincreement = "CUS1";
5. if the value is greater than zero
int j=i+1;
autoincreement = "CUS" + j
I hope it will help you...
Thanks and regards
S.Sursh
"IF YOU WANT TO SHINE LIKE A SUN FIRST YOU HAVE BURN LIKE IT".
Sign In
to post your comments
Submit New Thread
Return to
Return to Discussion Forum
Top Contributors
Today
Last 7 Days
more...
Email subscription
.NET Jobs
.NET Articles
.NET Forums
Articles Rss Feeds
Forum Rss Feeds