Hi
mysql select id,cat from table where cat=(select cat from table where id=51);
+-+--+
| id | cat |
+-+--+
| 40 | FLK |
| 41 | FLK |
| 42 | FLK |
| 44 | FLK |
| 45 | FLK |
| 46 | FLK |
| 47 | FLK |
| 48 |
If I understand that correctly, you only need to add the extra condition
to the WHERE clause of the main query. So:
SELECT id, name, cat FROM table
WHERE cat = (SELECT cat FROM table WHERE id = $ID) AND id = $ID;
This should display all rows, before and including the row with the same
elk dolk wrote:
If I understand that correctly, you only need to add the extra condition
to the WHERE clause of the main query. So:
SELECT id, name, cat FROM table
WHERE cat = (SELECT cat FROM table WHERE id = $ID) AND id = $ID;
This should display all rows, before and including the
Chris [EMAIL PROTECTED] wrote:
Huh? You want before, after and including? So everything?
Maybe give us an example of what you want to get out of the query rather
than us guessing.
I keep the path to my photos in this DB so it is a photo Gallery , when I click
on a thumbnail I want to see