$query="SELECT post_book.*,send_book.* FROM post_book INNER JOIN send_book ON post_book.id = send_book.id_book WHERE send_book.status ='0' GROUP BY post_book.location";
select id, name, group_concat(id_book) from (
select p.*, s.id_book from province as p, send_book as s where p.id = s.p_1
union all
select p.*, s.id_book from province as p, send_book as s where p.id = s.p_2
union all
select p.*, s.id_book from province as p, send_book as s where p.id = s.p_3
union all
select p.*, s.id_book from province as p, send_book as s where p.id = s.p_4
} as s group by name
$query="SELECT post_book.location, GROUP_CONCAT(send_book.id_book) AS id_book
FROM post_book
INNER JOIN send_book ON post_book.id = send_book.id_book
WHERE send_book.status ='0'
GROUP BY post_book.location";