I'm new here and I hope I am asking my question correctly: I am trying to implement search on forums database. I have 'questions' table and 'answers' table (they both related by 'id_question' field). I also have 'suggestions' table and 'comments' table that are also related. In addition I have 'profiles' table which related to every table I've mentioned before by 'profile_id' field, this profiles table holds the information on the users.
I would like to implement wide search on specific fields ('topic', 'description'...) in all the four tables I've mentioned before, and display those fields and the information of the user who wrote the post. I really messed with this. right now I have 4 queries (for each table), and each query makes join with profiles table. Do you know better way to do this?
Thanks!