Skip to content
Advertisement

How to fetch and merge data according to groupby Mysql Php

I am working with mysql and php and i want to get data according to “city” in array Here is my table “merchants”

Here is table “locality”

Here is table “city”

And i want to fetch data according to “city/locality”,For example i want to fetch all record of city(group by city),in other words i want like following output,how can i do this ?

I tried with following code but giving me list of locality/city , not giving me result as i want,Where i am wrong ?

Advertisement

Answer

You can try with following code

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement