I want to show images from database.I have two tables
gallery_photos
I want to show any photos_filename with category_name. photo_category is the foreign key of category_id
mysql query i wrote
SELECT distinct a.category_name
,b.photo_filename
FROM gallery_category a
inner join gallery_photos b on (a.category_id=b.photo_category)
please help me to do that...
i want to select exactly like this
albums/1456226111.jpg interior
albums/1456226239.jpg graphics
albums/1456226339.jpg random
albums/1456226478.jpg goods