cheechm Posted September 14, 2008 Share Posted September 14, 2008 Hi, What is the best way to search more than one MySQL table in a database at the same time from user input? Thanks Link to comment https://forums.phpfreaks.com/topic/124230-mysql-search/ Share on other sites More sharing options...
Mchl Posted September 14, 2008 Share Posted September 14, 2008 It depends what data you want to get. If data is somehow related between these tables, then JOINs are used. Link to comment https://forums.phpfreaks.com/topic/124230-mysql-search/#findComment-641529 Share on other sites More sharing options...
cheechm Posted September 14, 2008 Author Share Posted September 14, 2008 Ok, thought so. Thanks Link to comment https://forums.phpfreaks.com/topic/124230-mysql-search/#findComment-641537 Share on other sites More sharing options...
cheechm Posted September 14, 2008 Author Share Posted September 14, 2008 How would I do it though? Can do joins and everything but how do I do: WHERE "everyfield" = $search_query? For clarification everyfield is everyfield in everytable from the join Thanks Link to comment https://forums.phpfreaks.com/topic/124230-mysql-search/#findComment-641541 Share on other sites More sharing options...
Mchl Posted September 15, 2008 Share Posted September 15, 2008 ... You want to search for $search_query in all fields in several tables? A need for query like that indicates some serious mistakes in how the database is designed... Link to comment https://forums.phpfreaks.com/topic/124230-mysql-search/#findComment-641762 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.