Re: number of record

From: Date: Mon, 04 Sep 2000 14:04:03 +0000
Subject: Re: number of record
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-2399@lists.php.net to get a copy of this message
Cong: If the 'number of record in table' is like a transaction ID, and it will not change if records are deleted, then you can create a third column with this ID number. If you need to know the actual position of the record in the table, well ..., this is a though one, you need to find a function that will tell you exactlly that, I searched the MySQL manual and couldn't find one. Saludos, Pablo Vera _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Saturday, September 02, 2000, 2:40:38 AM, Cong wrote: CTN> Hi all ! CTN> I have a table with 2 columns : Date and Name. CTN> All of records are sorted ( order by Date). CTN> I want to select Date,Name and number of record in table(not in result). CTN> ex: CTN> I have a table: CTN> Date Name CTN> 9/5/2000 A CTN> 9/3/2000 B CTN> 9/2/2000 A CTN> 9/1/2000 D CTN> order by date : CTN> Date Name CTN> 9/1/2000 D CTN> 9/2/2000 A CTN> 9/3/2000 B CTN> 9/5/2000 A CTN> numbering records: CTN> Number Date Name CTN> 1 9/1/2000 D CTN> 2 9/2/2000 A CTN> 3 9/3/2000 B CTN> 4 9/5/2000 A CTN> I want to select records having Name=A. CTN> result of query: CTN> Number Date Name CTN> 2 9/2/2000 A CTN> 4 9/5/2000 A CTN> How can I do ? CTN> Thanks for your help. CTN> Cong

« previous php.windows (#2399) next »