Hi

I have the following problem:

I have a search box in which user can search either for a post, username or e-mail.

Posts are in my posts table, and users are located in my users table. Tables have the following structure:

Posts

post_id
user_id
post
post_date
visible


Users

userid
username
email
firstname
lastname


Can I get the results from both tables with one query? Not sure how that will benefit me (if at all), just asking.

Then I should display the results on same page, but posts first, and after the users. As you can see, posts will have different data to display and users will display different data.
Any help with building this query will be deeply appreciated.

Regards,Zoreli