Having a hard time trying to work out how to make a mysql query and output the data into a table like the one I have made below.
Been playing around for a few days now with no luck, so any help would be much appreciated.
The image below shows my 3 database tables(in simple form) and what i’m trying to output using PHP/MYSQL.
The image also shows the total amount (count) of listings for each user for each category, I cant work out how i join it all together.
Hope this makes some sense!

Initially, you can do it like this,
But I guess you have unknown number of
cat_nameon your table. A Dynamic SQL is much more preferred,