Re: Pragmatically changing a "Record Number"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jason Pruim wrote:

On Aug 30, 2007, at 5:14 AM, Stut wrote:

Jason Pruim wrote:
Hi Everyone,

Hi Dr Jason.

I think after I get this question answered, I can stop asking for awhile since my project will be done, at least until the users say "What happened to XYZ????" then I'll ask again :) I asked on a MySQL list about "Resetting a auto increment filed" so that there arn't any gaps in the record number. So to say it another way, I have a table that has 900 records in it, I've added 3 records, but then deleted 2 of those which puts the actual record count at 901 but my auto increment field starts at 904 on the next insert. Is there away with PHP that I can pragmatically change that value to the total records in the database more so then a representation of the actual record number?

What are you actually trying to achieve? Why do you need all records to have a sequential number? Ignore how you're going to do it, just tell us why you think you need this, because I've never come across a reason to need this.


What I am trying to achieve, is something along the lines of excel... You can clear out a row in excel, and then "sort" all the blank lines out renumbering the records. Basically, the people I'm going to sell this app too, are used to using excel, so I'm attempting to mimic as much of it as I can.

Does that help clear it up?

Not really. You are in control of how the data gets displayed. This has a very loose connection with how the data is actually stored in the database.

How are you displaying the data to your users? Why do they need a row number? If you're writing a spreadsheet application then an autoincrement column for the row number is not what you want since the row is something you need to control.

Some insight into what you are actually going to be doing with this number would be helpful, rather than just the assertion that you need it. We get that you think you need this sequential number, but why?

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux