SELECT a.nid,
GROUP_CONCAT(b.name ORDER BY b.id) DepartmentName
FROM Notes a
INNER JOIN Positions b
ON FIND_IN_SET(b.id, a.forDepts) > 0
GROUP BY a.nid
More Related Contents:
- Join two tables with comma separated values
- Php mysql tabs don’t output [closed]
- Update Mysql except when field not null
- How can I prevent SQL injection in PHP?
- jQuery Validate remote method usage to check if username already exists
- PDO get the last ID inserted
- Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0
- Warning: mysqli_connect(): (HY000/2002): No such file or directory
- I cannot get my login form to connect interact properly with mySQL database [closed]
- Best way to check if mysql_query returned any results?
- mysql_fetch_array return only one row
- mysql_num_rows(): supplied argument is not a valid MySQL result resource [duplicate]
- Laravel 5.2 – Use a String as a Custom Primary Key for Eloquent Table becomes 0
- Insert multiple rows with PDO prepared statements
- a better approach than storing mysql password in plain text in config file?
- Selecting a float in MySQL
- mysql query result in php variable
- mysql_real_escape_string is undefined
- Unknown database error in PHP but it exists in PHPMyAdmin
- How do detect that transaction has already been started?
- return multiple response data in one response
- CakePHP Database connection “Mysql” is missing, or could not be created
- How to get primary key of table?
- MySQL Alter Table Add Field Before or After a field already present
- mysql error ‘TYPE=MyISAM’
- Why do I get “Resource id #4” when I apply print_r() to an array in PHP? [duplicate]
- Best way to store IP in database?
- Which is fastest in PHP- MySQL or MySQLi?
- Is mysql_real_escape_string enough to Anti SQL Injection?
- Using PHP to upload file and add the path to MySQL database