Re: Re: record pointer

From: Date: Thu, 05 Jul 2007 21:17:15 +0000
Subject: Re: Re: record pointer
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-43751@lists.php.net to get a copy of this message
Hi > O.K. the id column is primary key and it is auto_incerment .I think my explanation was not > clear enough : > > this is my query : SELECT * FROM table WHERE ID=$ID > this will find the record with the specified ID and I will be able to see it, now I want to > be able to scroll up and down to all the records that belong to the same cat(egory)! Assuming that is correct now, use a sub-query: SELECT id, name FROM table WHERE cat = (SELECT CAT FROM table WHERE id=$ID); Niel

« previous php.db (#43751) next »