I have a little problem.
I have a field in a table that holds comma separated values of the primary key values of another table that relate to this record. I want to use a join query to pull all the records from the second database where the id is in the comma separarted string contained in the first table.
Now I have tried this and imagine (if its possible to do this in one query that is) that the right answer will be something similar...
the field containing the comma separated values i want is called `images` and is in the `tbldoc` table.
SELECT `im`.* FROM `tblimages` AS `im`, `tbldocs` AS `doc` WHERE `doc`.`docid` = " . $_GET['d_id'] . " AND `im`.`image_id` IN (`doc`.`images`)