I have been working on this problem for 3 days and am bleary eyed. I have an SQL "customers" table containing the customers name, address, email and a field called "venue" containing a comma delimited set of "id"'s of the venues of training courses they are interested in. (like: 18,22,35,41)
I have a second table called "venue" which holds the venues of all courses. Each course is a separate row in the "venue" table with an auto-increment id. The venue field in the "customers" table are a collection of the row "id" in the venue table which the customer selected at registration.
Once the customer is registered and is transported to the "my interests" page I would like to display the courses they have registered an interest in by outputting the row data of each "id" of the "venue" table that are held in the "customer.venue" field of the customer table.
I hope that makes sense...
My customer select
$sqlc = "Select * from customers ORDER BY id DESC LIMIT 1";
My venue selection
$venue = $result['venue'];
My current "venue" select code which isn't working
sqlcp = "SELECT * FROM venue WHERE FIND_IN_SET('$venue', id)";
Please ask any questions needed, thanks for looking