Today to do the project encountered a problem, Baidu has not found a long time the problem lies
It's jiangzi, a table.
The associated table
Then I query with the SQL statement
Point.pid,point.pname,group_concat (downsite.pname) dname from Point,downsite where Point.pid=downsite.pid GROUP by Point.pid
It turned out to be
Where is the information of Beijing point???? Finally asked the big God just know, I this SQL statement two table connection way is not, the way to connect outside, because the above kind of connection is within the connection, only two tables match the row to appear in the result set, outside the connection there is no limit.
The last SQL statement is
Select Point.pid,point.pname,group_concat (downsite.pname) dname from point
Left join Downsite on Point.pid=downsite.pid GROUP by Point.pid success
Additional information about MySQL Group_concat columns that cannot be displayed as empty