Re: Pragmatically changing a "Record Number"

From: Date: Wed, 29 Aug 2007 18:05:37 +0000
Subject: Re: Pragmatically changing a "Record Number"
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-261472@lists.php.net to get a copy of this message
On Aug 29, 2007, at 1:58 PM, Jay Blanchard wrote:
[snip] Is there away with PHP that I can pragmatically change that value to the total records in the database more so then a representation of the actual record number? [/snip] 1. Changing the values in an auto-increment column is just Bad[tm], especially if you are using it as a unique index.
It's not yet, and I don't plan to have it be part of a unique index, unless I absolutely need to onceI look into being able to search...
2. You can get a row count using mysql_num_rows()
3. Ask yourself, "Is it important to keep the auto-increment field contiguous?"
The main reason for changing it is I do currently have an option to sort by record number, although, if I add a Record number in php, but still have it sort based off of the record number stored in the database, it would still sort right, but also look right...
4. You can always display a row number with PHP that is contiguous, but not representative of the actual column.
I think you may have made me go a different way in my thinking. Thank you :) -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com japruim@raoset.com

« previous php.general (#261472) next »