Is it possible to get multiple result rows as some combined format (like an array?) in a single MySQL query?
Example (talking about the part in red):
Code:
SELECT IssuedBy, db_product_id, SerialNum, Description, Status, DATE_FORMAT(IssueDate,'%m.%d.%Y') as IssueDate,
(SELECT cat_id FROM ncr_failures f WHERE f.ncr_num=n.Number) as Categories
FROM ncrs n WHERE Number = 20030 LIMIT 1
The sub-query highlighted in red will return multiple rows (e.g., 117 and 174). I know it's possible to create a 2nd query and iterate through the results that way, but is it possible to do it in a single query?
In its current form, the query gives an error in the HeidiSQL client: "Cannot retrieve Resultset data".