RE: [PHP] Resetting ID in mySQL DB

From: Date: Mon, 12 Nov 2001 07:10:43 +0000
Subject: RE: [PHP] Resetting ID in mySQL DB
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74231@lists.php.net to get a copy of this message
say you have 100 records. you delete number 36. your db will then be ... 34 35 37 38 ... correct? after a delete, you could then say: update table set id_num=id_num-1 where id > 36 and this would update all relevant records -----Original Message----- From: Thomas Edison Jr. [mailto:thomasedisonjr@yahoo.com] Sent: Monday, November 12, 2001 1:52 AM To: php-general@lists.php.net Subject: [PHP] Resetting ID in mySQL DB Hi, I'm facing a problem. I made a simple DB with simple adding records in DB operation. I've even put up a JavaScript validation of the Form from where you add info. And yet, in the display table, there are many many blank fields. I don't know how they are generated. The Adding of info form is at : http://www.mjimm.com/index.php3?page=fanlist_add.php3 The display of records is at : http://www.mjimm.com/fanlist_view.php3 Now the Display table also Displays the ID of the Record. If i go in my mySQL Admnin, and delete the rows with blank or duplicate records.. the ID also is deleted but then is alway missing from the list. That is, if i delete Row with ID 78, the next record feeded will start from 79 and not 78. So there's gonne be missing ID's from Records. Which i don't want. But which has already happened. How can i correct it?? I want to reset the entire IDs to reflect the true Number of records after i delete the Empty/Blank Rows & Duplicate Record Rows!! How can i do that! Please help!!!!! Cheers & Glory, Thomas edison jr. ===== Rahul S. Johari (Director) ****************************************** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : abraxastech@yahoo.com Tel : 91-4546512/4522124 ******************************************* __________________________________________________ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#74231) next »