![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
automatically assigning a number into the database from phphi i have a form that submitts infrormation into the database i want to have something where by each time a user submitts a form they are assigned a number automatically into the database? nothing complex like guest no1
then next person guest number 2 etc . can some one tell me how i can do this an give an example if possible please thanks |
|
#2
|
|||
|
|||
Re: automatically assigning a number into the database from phpCreate and query to look at the number field within your db.. then
create a script that add one to the next number example $sql = "SELECT num FROM DB ORDER BY num DESC"; // latest number within db $num = $row['num']; // set this number to enter in db for new user $num = $num++; I hope this is kind of what you are looking for. |
|
#3
|
|||
|
|||
Re: automatically assigning a number into the database from phpJust create a new field in your table. Call it ID, and set to auto_increment. It will basically give an id number for every post.
|
Recent GIDBlog
2nd Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Converting a number amount to text | Godzilla | CPP / C++ Forum | 5 | 31-Mar-2006 11:38 |
| Program Needed: Perfect Number Program in C language | koool_kid | C Programming Language | 12 | 02-Dec-2005 14:02 |
| Please help with functions... | brookeville | CPP / C++ Forum | 36 | 05-Nov-2004 00:23 |
| Anyone can write a program code for this??? | chriskan76 | C Programming Language | 1 | 19-Oct-2004 20:25 |
| Parsing PHP code that's stored in a database. | JdS | MySQL / PHP Forum | 3 | 13-May-2004 09:15 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The