At 9:04 PM -0400 9/4/07, brian wrote:
You're being pissy again. It really reflects poorly on you and, i
suspect, it's keeping you from truly understanding what it is that
i'm trying to help you with.
Enough said on this subject, besides I don't think you're reading
what I write correctly anyw
tedd wrote:
At 12:11 PM -0400 9/4/07, brian wrote:
You are confusing a product ID with this index number. They are
very much not the same thing. A product ID (PLU, serial #,
whatever) should not change. This index does change, any time a row
is removed from the database. How can you suggest tha
At 12:11 PM -0400 9/4/07, brian wrote:
tedd wrote:
At 6:18 PM -0400 9/3/07, brian wrote:
It may be just fine in your case, but from a DB design standpoint
it most certainly is not efficient. Why re-order the entire table
for something like this? Altering an entire table because one row
has b
tedd wrote:
At 6:18 PM -0400 9/3/07, brian wrote:
It may be just fine in your case, but from a DB design standpoint it
most certainly is not efficient. Why re-order the entire table for
something like this? Altering an entire table because one row has been
deleted suggests to me that the sche
Surely we're into basic database design. If you have an auto_increment
record key that needs changing from time to time then you've designed
the database incorrectly. Use a 'normal' key field such as
"Product_Id" and have your application generate the number.
Simple.
No?
On 9/4/07, tedd <[EMAIL
At 6:18 PM -0400 9/3/07, brian wrote:
Renumbering anything is pretty quick these days. To me, things that
are "horribly inefficient" are also slow. So, I don't agree. If I
remember correctly, I can even renumber a 100K item dB
auto_increment index in less than one second -- but I wouldn't
reco
tedd wrote:
At 3:17 PM -0400 9/3/07, brian wrote:
Well, yes, that would work also but is horribly inefficient because
the *entire table* must be altered any time a row is deleted.
"horribly inefficient"?
Renumbering anything is pretty quick these days. To me, things that are
"horribly inef
At 3:17 PM -0400 9/3/07, brian wrote:
tedd wrote:
As for the "gap" problem, there is no gap problem if you create
another field for record number and alter it to your liking (NOTE:
I did not say AUTO_INCREMENT). If you add/delete a record, then
adjust the "field for record number" accordingly.
tedd wrote:
At 11:48 AM -0400 9/3/07, brian wrote:
Arrggg. No, I did not say create another auto_increment field -- I said:
Quote
The reason for not wanting to care about the auto_increment id is that
it is something that the database uses and really should not be changed.
If you want to have
At 11:48 AM -0400 9/3/07, brian wrote:
tedd wrote:
At 10:27 AM +1000 9/3/07, Chris wrote:
tedd wrote:
At 6:14 PM -0400 9/2/07, brian wrote:
tedd wrote:
How is that contrary to what I said?
You are actually changing the id's in the database.
Brian's example is making up an id to displa
tedd wrote:
At 10:27 AM +1000 9/3/07, Chris wrote:
tedd wrote:
At 6:14 PM -0400 9/2/07, brian wrote:
tedd wrote:
How is that contrary to what I said?
You are actually changing the id's in the database.
Brian's example is making up an id to display (much like the excel row
numbers) rat
At 10:27 AM +1000 9/3/07, Chris wrote:
tedd wrote:
At 6:14 PM -0400 9/2/07, brian wrote:
tedd wrote:
Hi to the original poster:
Snip -- a lot of discussion
Use the following code at your own peril.
$dbQuery = "ALTER TABLE $dbtable ";
$dbQuery .= "DROP id, ";
$dbQuery .= "ADD id INT UNSIGNED
tedd wrote:
At 6:14 PM -0400 9/2/07, brian wrote:
tedd wrote:
Hi to the original poster:
Snip -- a lot of discussion
Use the following code at your own peril.
$dbQuery = "ALTER TABLE $dbtable ";
$dbQuery .= "DROP id, ";
$dbQuery .= "ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT,";
$dbQuery .=
At 6:14 PM -0400 9/2/07, brian wrote:
tedd wrote:
Hi to the original poster:
Snip -- a lot of discussion
Use the following code at your own peril.
$dbQuery = "ALTER TABLE $dbtable ";
$dbQuery .= "DROP id, ";
$dbQuery .= "ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT,";
$dbQuery .= "AUTO_INCREME
tedd wrote:
Hi to the original poster:
Snip -- a lot of discussion
Use the following code at your own peril.
$dbQuery = "ALTER TABLE $dbtable ";
$dbQuery .= "DROP id, ";
$dbQuery .= "ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT,";
$dbQuery .= "AUTO_INCREMENT = 1";
$result = mysql_query($dbQuery
Hi to the original poster:
Snip -- a lot of discussion
Use the following code at your own peril.
$dbQuery = "ALTER TABLE $dbtable ";
$dbQuery .= "DROP id, ";
$dbQuery .= "ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT,";
$dbQuery .= "AUTO_INCREMENT = 1";
$result = mysql_query($dbQuery) or die("Cou
If I've understood correctly your record/Id number relates to a message/post.
Let's say the PHP list has message numbers and this post is number
456. If I have a list of posts and sort them by user and provide the
user with a numbered list of posts from 1 to N in user sequence
there's VERY little
I don't think you really want to do that, either. You don't need a
field in the database to accomplish what you are trying to do.
Execute your query to select the records you want, sorting them into
what ever order you want. When you display the records on your web
page, add a PHP variable, say
On Aug 30, 2007, at 6:52 AM, Stut wrote:
Jason Pruim wrote:
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 anywh
Jason Pruim wrote:
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
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
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 :)
M. Sokolewicz wrote:
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 abo
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
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 i
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 file
Please don't do that...autonumber should not be relied for anything other than
a unique row identifier. It should NOT matter to the application what that
value is as long as it unique. If you need a count of the number of records, do
a query (select count(*) from table...)
bastien> To: php-ge
On Aug 29, 2007, at 2:27 PM, Jim Lucas wrote:
Jason Pruim wrote:
3. Ask yourself, "Is it important to keep the auto-increment field
contiguous?"
The main reason for changing it is I do currently have an option
to sort by record number, although, if I add a Record number in
php, but still h
On Aug 29, 2007, at 2:41 PM, Stephen wrote:
--- Jason Pruim <[EMAIL PROTECTED]> wrote:
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
On Aug 29, 2007, at 3:02 PM, Richard Lynch wrote:
On Wed, August 29, 2007 12:49 pm, Jason Pruim wrote:
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 Wed, August 29, 2007 12:49 pm, Jason Pruim wrote:
> 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 incre
On 8/29/07, Stephen <[EMAIL PROTECTED]> wrote:
> --- Jason Pruim <[EMAIL PROTECTED]> wrote:
>
> > 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
>
Jason Pruim wrote:
Hi Everyone,
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
--- Jason Pruim <[EMAIL PROTECTED]> wrote:
> 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 ther
Jason Pruim wrote:
3. Ask yourself, "Is it important to keep the auto-increment field
contiguous?"
The main reason for changing it is I do currently have an option to sort
by record number, although, if I add a Record number in php, but still
have it sort based off of the record number stored
On Aug 29, 2007, at 1:58 PM, Jay Blanchard wrote:
[snip]
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?
[/snip]
1. Changing the values in an auto-increment column is just Bad[tm]
[snip]
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?
[/snip]
1. Changing the values in an auto-increment column is just Bad[tm],
especially if you are using it as a unique index
37 matches
Mail list logo