gulamansari Posted January 31, 2011 Share Posted January 31, 2011 hi, i want to retrieve data multiple table using joining. All table has different field name only one field is common example (category_id). so please help me i sending attachment image. data will be show like this image.. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/226212-to-retrieve-data-using-joining/ Share on other sites More sharing options...
suma237 Posted January 31, 2011 Share Posted January 31, 2011 specify the data table sturcture Quote Link to comment https://forums.phpfreaks.com/topic/226212-to-retrieve-data-using-joining/#findComment-1167758 Share on other sites More sharing options...
gulamansari Posted January 31, 2011 Author Share Posted January 31, 2011 Video Table Structure: CREATE TABLE IF NOT EXISTS `videos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `video_title` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `video_description` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `video_keywords` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `video_thumbnail` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `video_file` varchar(255) COLLATE latin1_general_ci NOT NULL, `video_url` text COLLATE latin1_general_ci NOT NULL, `category_id` int(11) NOT NULL DEFAULT '0', `final_rating` float NOT NULL DEFAULT '0', `video_date` date NOT NULL DEFAULT '0000-00-00', `video_status` int(11) NOT NULL DEFAULT '0', `hit` int(11) NOT NULL, `activate_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `mem_id` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT ; ***************************************************** Articles Table......... CREATE TABLE IF NOT EXISTS `article` ( `art_id` int(11) NOT NULL AUTO_INCREMENT, `category_id` int(11) NOT NULL, `art_title` varchar(255) NOT NULL, `art_desc` text NOT NULL, `art_thumbnail` varchar(100) NOT NULL, `art_url` varchar(255) NOT NULL, `final_rating` float NOT NULL, `art_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `art_status` int(4) NOT NULL, `hit` int(11) NOT NULL, `mem_id` int(11) NOT NULL, PRIMARY KEY (`art_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT ; ****************************************************** Picture Gallery Table--- CREATE TABLE IF NOT EXISTS `picture_gallery` ( `g_id` int(11) NOT NULL AUTO_INCREMENT, `category_id` int(11) NOT NULL, `gallery_title` varchar(255) NOT NULL, `gallery_desc` varchar(255) NOT NULL, `gallery_thumbnail` varchar(100) NOT NULL, `picture_url` varchar(255) NOT NULL, `final_rating` float NOT NULL, `gallery_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `gallery_status` int(4) NOT NULL, `hit` int(11) NOT NULL, `activate_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `mem_id` int(11) NOT NULL, PRIMARY KEY (`g_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMEN; *********************************************************** Games Table Structure--------- CREATE TABLE IF NOT EXISTS `games` ( `id` int(11) NOT NULL AUTO_INCREMENT, `game_title` varchar(255) NOT NULL, `game_desc` text NOT NULL, `game_keywords` varchar(255) NOT NULL, `game_thumbs` varchar(100) NOT NULL, `game_file` varchar(255) NOT NULL, `game_url` varchar(255) NOT NULL, `category_id` int(11) NOT NULL, `final_rating` float NOT NULL, `game_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `game_status` int(4) NOT NULL, `hit` varchar(40) NOT NULL, `activated_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `mem_id` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT; These are the All Table Structures in which have to get join and retrieve all data Quote Link to comment https://forums.phpfreaks.com/topic/226212-to-retrieve-data-using-joining/#findComment-1167785 Share on other sites More sharing options...
fenway Posted February 11, 2011 Share Posted February 11, 2011 What's the question? Quote Link to comment https://forums.phpfreaks.com/topic/226212-to-retrieve-data-using-joining/#findComment-1172734 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.