Re: [PHP] Holes in mysql primary key and other db issues...

2007-03-05 Thread Steve Edberg
At 2:49 PM -0600 3/4/07, Larry Garfield <[EMAIL PROTECTED]> wrote: On Sunday 04 March 2007 1:15 pm, Mike Shanley wrote: Stut wrote: >> I have a sidebar on my site that gets a few random articles from that >> table, prints the titles, small blurbs, and a link. The link goes to >> the main art

Re: [PHP] Holes in mysql primary key and other db issues...

2007-03-04 Thread Larry Garfield
On Sunday 04 March 2007 1:15 pm, Mike Shanley wrote: > Stut wrote: > >> I have a sidebar on my site that gets a few random articles from that > >> table, prints the titles, small blurbs, and a link. The link goes to > >> the main article. I get the random IDs outside of mysql because I've > >> made

Re: [PHP] Holes in mysql primary key and other db issues...

2007-03-04 Thread Mike Shanley
Stut wrote: I have a sidebar on my site that gets a few random articles from that table, prints the titles, small blurbs, and a link. The link goes to the main article. I get the random IDs outside of mysql because I've made it more likely for newer articles to be chosen than older ones... Th

Re: [PHP] Holes in mysql primary key and other db issues...

2007-03-04 Thread Stut
Please include the list in all replies. Mike Shanley wrote: Stut wrote: There is no "simple" way. But this question comes up fairly often, and the usual answer is that there's no need to fill the holes. Why do you think you need to fill the holes? If there is no good reason to do it, why are

Re: [PHP] Holes in mysql primary key and other db issues...

2007-03-04 Thread Stut
Mike Shanley wrote: Stut wrote: I'm not sure what you mean by "extra indexing memory". The autonumber feature is simple in that MySQL just keeps track of the last ID used and increments it to get the next one. However, I don't think there is any overhead caused by deleted records. If you can c

Re: [PHP] Holes in mysql primary key and other db issues...

2007-03-04 Thread Mike Shanley
Stut wrote: I'm not sure what you mean by "extra indexing memory". The autonumber feature is simple in that MySQL just keeps track of the last ID used and increments it to get the next one. However, I don't think there is any overhead caused by deleted records. If you can cite a source for t

Re: [PHP] Holes in mysql primary key and other db issues...

2007-03-04 Thread Stut
Mike Shanley wrote: I'm currently on a server using mysql 4.x and I'm having a few small issues that I can't seem to find a decent solution to. I would appreciate any help. First, I have an ID field as my primary key, but whenever I delete a row, that ID is not filled. This is a major problem

[PHP] Holes in mysql primary key and other db issues...

2007-03-04 Thread Mike Shanley
Hi, I'm currently on a server using mysql 4.x and I'm having a few small issues that I can't seem to find a decent solution to. I would appreciate any help. First, I have an ID field as my primary key, but whenever I delete a row, that ID is not filled. This is a major problem for random cal