WebSite X5Help Center

 
Vijaya R.
Vijaya R.
User

How to add numbers to a database?  en

Autor: Vijaya R.
Visitado 1814, Seguidores 2, Compartilhado 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??

Publicado em
6 RESPOSTAS - 1 ÚTIL
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!

Ler mais
Publicado em de Claudio D.
Vijaya R.
Vijaya R.
User
Autor

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!!!

Ler mais
Publicado em de 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. 

Ler mais
Publicado em de Steven Anderson
Vijaya R.
Vijaya R.
User
Autor

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...

Ler mais
Publicado em de 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?

Ler mais
Publicado em de 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!

Ler mais
Publicado em de Claudio D.