--- Pete <[EMAIL PROTECTED]> wrote:

> In message <[EMAIL PROTECTED]>, Anna
> <[EMAIL PROTECTED]> writes
> >Hello group,
> >
> >I have another question about record deletion from
> >database.
> >
> >For example, my database has 10 records
>
> <PEDANTIC MODE> my TABLE has 10 records </PEDANTIC
> MODE>

That was my example. :)

> > with ids 1
> >through 10. If I delete id #10 then everything is
> good
> >and all the records are still 1 through 9. However,
> if
> >I delete record id #4, then in my db I would have
> >records 1 through 10 with id #4 missing.
> >
> >Is there a command that syncs the database? How do
> I
> >go about this to keep all the ids in the right
> order
> >after the deletion? or What do I need to do to
> prevent
> >that from happenning?
>
> Sync the database with what?  What makes you think
> that they will be in
> the wrong order?
>
>
> Firstly, it doesn't matter what order the records
> are in, an index will
> make them appear in any order that you want them to
> be.  If the record
> ID4 is deleted, then you will have ID2, ID3, ID5,
> ID6, which IS the
> correct order.
>
> Secondly, there is no command to renumber the
> records, because there is
> no reason to do it, and under some circumstances -
> if your database has
> multiple tables which connect to one another, for
> example - then
> changing the ID field can be a disaster.

Yeah I think it's making more sense now.

> Don't do it, that's the way it is supposed to
> work...

Got it.

> --
> Pete Clark
>
> Free advertising for your website, business, or
> organisation at:
> http://www.hotcosta.com/resources.php

Anna Vester

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list




SPONSORED LINKS
Php mysql Job postings


YAHOO! GROUPS LINKS




Reply via email to