Re[2]: Inserting rows with missing IDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Bob,

Nope; they're not. They are blog entries that were deleted along with
their comments. I'm just thinking about doing this when the amount of
entries exceeds a reasonable number.
-- 
With best regards from Ukraine,
Andre
Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org
Yahoo! messenger: andre.polykanine; ICQ: 191749952
Twitter: m_elensule

----- Original message -----
From: Bob McConnell <rvm@xxxxxxxxx>
To: Andre Polykanine <andre@xxxxxxxx>
Date: Monday, May 3, 2010, 4:40:18 PM
Subject:  Inserting rows with missing IDs

From: Andre Polykanine

> It's not a strictly PHP question, however since I use that with PHP,
> I'm asking it there.
> How can I accomplish the task of inserting rows into MySql database
> with missing IDs? Say, I have rows with IDs 1, 2, 3, 5, 9, 12, 17, and
> 195. How do I make the check that allows to insert firstly the missing
> IDs and only then apply the auto-increment?

Why are they missing? Were they present at one time then deleted? If so,
were they used as foreign keys from another table or referenced in
queries for other data that may still reference those empty rows?

Think about the ramifications of old data in other tables that may be
inherited when new rows are assigned a deleted ID.

Bob McConnell


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux