List:General Discussion« Previous MessageNext Message »
From:Stijn Verholen Date:August 27 2005 7:48pm
Subject:Re: newbee question
View as plain text  
leegold wrote:
> On Sat, 27 Aug 2005 19:43:57 +0100, ross@stripped said:
> 
>>Using mysql with php I have a database that has a unique value for the
>>user id. when people get delete off the list I want the unique numbers to
>>compact down so.
>>
>>user id 1
>>user id 4
>>user id 5
>>user id 7
>>user id 9
>>user id 10
>>
>>becomes 
>>
>>user id 1
>>user id 2
>>user id 3
>>user id 4
>>user id 5
>>user id 6
>>
>>If this is not possible how can I find the first entry in the database
>>and last entry with php/mysql?
> 
> 
> Not an answer, sorry. But just wondering, you said user id is unique. Is
> it a primary key? Maybe you should leave it alone, else you're gonna
> have "trouble"...
> :^ )
> 
> Lee G.
> 


ORDER BY <unique user id> DESC/ASC LIMIT 1

Thread
newbee questionross27 Aug
  • Re: newbee questionleegold27 Aug
    • Re: newbee questionStijn Verholen27 Aug
  • Re: newbee questionPeter Brawley27 Aug
  • Re: newbee questionPeter Brawley27 Aug