Ok - bit of a weird one but we're working on the principle that I don't pay for database processing time so I should use as much as I can get.
I want to run a query which returns one column (ignore errors here - I've written it quickly - I'm ok with the basic stuff)
And turn the results of that query into a comma delimited list which I can then add as a column in a query on the company table.
Now I know I could do this in my code but I'd rather like the database server to do it for me.
Any ides?
Yet another unchecked rambling brought to you by:
Oddball
I want to run a query which returns one column (ignore errors here - I've written it quickly - I'm ok with the basic stuff)
Code:
SELECT `name`
FROM `company_does_sport`, `sports`
WHERE `company_does_sport`.`sportId` = `sports`.`sportId`
AND `company_does_sport`.`companyId` = ?cId
And turn the results of that query into a comma delimited list which I can then add as a column in a query on the company table.
Now I know I could do this in my code but I'd rather like the database server to do it for me.
Any ides?
Yet another unchecked rambling brought to you by:
Oddball