On Aug 30, 2007, at 6:34 AM, Stut wrote:
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?
The information is being displayed in a table, and can be sorted by
any of the fields. The purpose of the application I am writing is
going to be a online database, giving my customers access to their
mailing list 24/7 from anywhere in the world.
Alot of the customers that my company deals with aren't the best when
it comes to computers, so it's a comfort level thing for them.
Also, I do have one customer that wants to be able to say to us "What
do you have for record #????" and have us be able say what it says
for that record. That customer is one of the people I want to switch
over to here ASAP and let her manage her mailing list.
But as I type that out, I think the reason I want a sequential
address number more then anything is to prevent the users from
asking, "I only have 900 records in my database, why do I have record
numbers over 1,000?". But, if I were to use something like
mysql_num_rows I could display a total record count and just tell
them to ignore the record number until there was an issue right? I
know that's on my end :) but I think I am talking my self out off
displaying sequential record numbers and finding other ways to
display the information :)
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim@xxxxxxxxxx
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php