![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.php archiveRe: Updating item numbers (or IDs)
From: Andy Jeffries <news@andyjeffries.co.uk>
Date: Thu Apr 27 2006 - 10:53:33 CEST
On Wed, 26 Apr 2006 22:24:23 -0700, cover wrote:
While I generally agree with Erwin on this, it's probably best leave them
The only way to do it AFAIK in MySQL (pre version 5 at least) is to loop.
$handle1 = open_mysql_connection_and_db();
$result1 = send_mysql_query("SELECT ID FROM Table1", $handle1)
It's not pleasant and you'll need to trigger it after deleting a record.
I also use pseudo-code above, partially because I use my own database
I also have classes generated for tables that have events for beforeDelete
But, as I said at the start, be very aware of Erwin's comments they are
Cheers,
Andy
-- Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer http://www.gphpedit.org | PHP editor for Gnome 2 http://www.andyjeffries.co.uk | Personal site and photosReceived on Mon May 1 03:05:55 2006 |