I have a frustrating problem that I thought would be simple but I am not finding the solution.
I have a Query below:
SELECT orderdetails.DetailsID FROM orderdetails WHERE orderdetails.ProgramActivated = 2
this would give me results such as:
As you can see the results are in a list, where as what I want to do is have the results separated by a comma (,) to be used in another SQL query.
So the above results should be:
I have been reading about GROUP_CONCAT which I was hoping would do it but I am not able to get it to work for me as the result is simply [BLOB] from the query below:
SELECT GROUP_CONCAT(orderdetails.DetailsID) AS DetailsID FROM orderdetails WHERE orderdetails.ProgramActivated = 2
Many thanks as always for your help.