WebSite X5Help Center

 
Vijaya R.
Vijaya R.
User

How to add numbers to a database?  en

Author: Vijaya R.
Visited 1839, Followers 2, Shared 0  

 I am entering data thro a contact form and it gets updated in the database, But I need to provide a serial number to identify. How to do it?? Any help??

Posted on the
6 ANSWERS - 1 USEFUL
Incomedia
Claudio D.
Incomedia

Hello Vijana,

You can add in the contact form you ue to send data to the BD a new field where you add a number to identify it so everytime you add new data you add also a different number in this field.

Many thanks!

Read more
Posted on the from Claudio D.
Vijaya R.
Vijaya R.
User
Author

Sorry I cant get you...See I am just asking for an incrementing numbers as serial numbers to be generated automatically when every data gets updated. So that we can Identify the data with the serial number...

Kindly I request not to use abbrevations....

Thanks in advance!!!

Read more
Posted on the from Vijaya R.
Steven Anderson
Steven Anderson
User

Are you using an external database? as it sounds like you need to set this up in your database. This field should be set as a primary key (a unique number) and a number that is an autonumber as such like in a ms access database do that the number auto increments as a new record is created. It depends on which database you are using the back end. Hope this helps. 

Read more
Posted on the from Steven Anderson
Vijaya R.
Vijaya R.
User
Author

Sorry for the late reply ....No I am not using any external databases I am just compiling data only from a contact form...every data need a unique numerical ID...

Read more
Posted on the from Vijaya R.
Steven Anderson
Steven Anderson
User

I haven't had a look how it works but if it is a database then you may be able to add an sql statement in it of auto_increment . Maybe incomedia  could clarify if you can add sql statements to the added databases?

Read more
Posted on the from Steven Anderson
Incomedia
Claudio D.
Incomedia

Hello Vijana,

It can be done by opening the MySql Administration on the server where you add a new column in the Table created in which you name something like ID and you add the option AUTO_INCREMENT.

In this way every entry will have an unique progressive number.

Many thanks!

Read more
Posted on the from Claudio D.