html - PHP Reference ID auto-increment for invoice -


I am looking to create a code that uses numbers such as 410001, 41, 0002, etc.

I have a table table - & gt; ID, reference, name, company, and email,

  & lt; php $ d = 'A08'; For {$ N = 0; $ n <6; $ n ++} {echo ++ $ d PHP_EOL; }? & Gt;   

which outputs:

A09 A10 A11 A12 A13 A14

I have a client ID = 1 or ID = 2 in my database, I want to present the ID for IDAD = 1 and reference ID for ID = 2 to 410002, so in my table, the sick has an ID and reference ID in the automrum.

Do you make any sense for the people?

Thank you!

You can try these MySQL queries for your table:

Table Create query:

  create table clients (ID int (16) AUTO_INCREMENT, reference int (16), name varchar (50), company varchar (50), email varchar (50), primary key (Id)); INSERT Query:  
  Enter value in `customer` (` context`, `name`,` company`, `email`) (value (SELECT Info_schema.tables from AUTO_INCREMENT WHERE table_name = 'clients' and table_schema = 'DATABASE_NAME') + 41000), 'client_name', 'company_name', 'email');    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -