linux1880 Posted October 6, 2010 Share Posted October 6, 2010 Hi friends, I have two mysql db tables, photos and album, I would like to list photos by album how do i do that ? CREATE TABLE `album` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `album_name` varchar(95) NOT NULL, `album_desc` text NOT NULL, PRIMARY KEY (`id`) ); CREATE TABLE `photos` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `album_id` int(11) NOT NULL, `thumb_name` varchar(255) NOT NULL, `photo_name` varchar(250) NOT NULL, PRIMARY KEY (`id`) ) Quote Link to comment https://forums.phpfreaks.com/topic/215261-how-to-list-photos-by-category-in-php/ Share on other sites More sharing options...
doddsey_65 Posted October 6, 2010 Share Posted October 6, 2010 "SELECT * FROM photos ORDER BY album_id" if you need more help let me know Quote Link to comment https://forums.phpfreaks.com/topic/215261-how-to-list-photos-by-category-in-php/#findComment-1119484 Share on other sites More sharing options...
linux1880 Posted October 6, 2010 Author Share Posted October 6, 2010 I would like to show the categories first when clicked show the related photos. Quote Link to comment https://forums.phpfreaks.com/topic/215261-how-to-list-photos-by-category-in-php/#findComment-1119512 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.