DarkPrince2005 Posted October 26, 2007 Share Posted October 26, 2007 I've got a search page that needs to search through 4 tables, anyone got an idee how? Quote Link to comment https://forums.phpfreaks.com/topic/74858-search-multiple-tables-query/ Share on other sites More sharing options...
fenway Posted October 26, 2007 Share Posted October 26, 2007 Everyone seems to asking this question lately... you can't search across table easily... UNION the search results from each table. Quote Link to comment https://forums.phpfreaks.com/topic/74858-search-multiple-tables-query/#findComment-378609 Share on other sites More sharing options...
DarkPrince2005 Posted October 28, 2007 Author Share Posted October 28, 2007 Union seems to work but three of the tables fields are the same but the fourth is different so i can't seem to display all the information that is neede, is there a way to solve this problem Quote Link to comment https://forums.phpfreaks.com/topic/74858-search-multiple-tables-query/#findComment-379728 Share on other sites More sharing options...
fenway Posted October 29, 2007 Share Posted October 29, 2007 Union seems to work but three of the tables fields are the same but the fourth is different so i can't seem to display all the information that is neede, is there a way to solve this problem Yes... don't use *, name the common fields (or alias them so that they have the same number/type). Quote Link to comment https://forums.phpfreaks.com/topic/74858-search-multiple-tables-query/#findComment-380371 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.