Re: SQL-query
| From: | Cam Dunstan | Date: | Tue, 21 Jan 2003 02:22:26 +0000 |
| Subject: | Re: SQL-query | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-18003@lists.php.net to get a copy of this message | ||
Wow! thanks fellas I really enjoyed that! except when Sean fired me! Hey
Sean can I get my Mars Bars and stuff out of my drawer or is it straight out
onto the street?
Nothing like the subject of auto increment to cause a few hot flushes hey
girls!! Proof indeed you have all had your moments with them. Strictly
though we are off-topic - but we have all missed some important points -
anyone know of a good spot to continue this discussion?
----- Original Message -----
From: "Sean Malloy" <sean@element.net.au>
To: "Bobo Wieland" <dev@elstudion.com>; <php-windows@lists.php.net>
Sent: Saturday, January 18, 2003 11:29 AM
Subject: RE: [PHP-WIN] SQL-query
> Why the hell would you want to do that?
>
> It looks ugly?
>
> I'll tell you what, when you have 80000 records in the database, and
#34,501
> is missing, I wonder if you'll notice, or want to write code to fill, the
> "hole"
>
> if you really want to fix the hole (as much as I think you are seriously
> wasting your time, and a sneaking suspicion as to why you would actually
> want to do it)..
>
> You would have to pull the data down into an arrya, loop through the array
> from start to finish, all the while checking if the current ID equals the
> counter value, as soon as it doesn't, you know you have found an ID you
can
> insert into the DB safely. Ofcourse, if there are records in other tables
> related by that ID, and you forgot to delet those, you'll get some really
> weird results.
>
> Not to mention the extra time your code would be taking to execute.
>
> if I saw someone writing all the code to patch holes in record sequences,
I
> would fire them. But thats just me. I'd rather have my employees working
on
> making things better, not slower for no reason at all other than 'i like
> pretty sequences'
>
>
> However, I'm guessing its because you actually want to create < PREV |
NEXT
> > next buttons, and you can't think of a way to link up the records.
>
> If thats the case, email me back, and I'll send you some example code
which
> should (perhaps), make your life much simpler.
>