Concatinating several values into one row works in MySQL console but not in PHP

flash

New Member
When I try to run the following code in the MySQL console it gives me a valid output that is correct:\[code\]SELECT * , GROUP_CONCAT( phonenrSEPARATOR ', ' ) FROM employee AS eJOIN phonenr AS p ON p.ssn = e.ssn GROUP BY e.ssn\[/code\]When I run the same code in PHP:\[code\]$result = mysql_query('SELECT * , GROUP_CONCAT(phonenrSEPARATOR ', ' ) FROM employee AS e JOIN phonenr AS p ON p.ssn = e.ssn GROUP BY e.ssn');\[/code\]I get the following error when I launch the website:Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\AppServ\www\test.php on line 17Could not query:Have no clue why PHP rejects this.
 
Back
Top