- Forums
- MySQL
- Mysql Query Select Multiple Values In Only One Query Database Table
mysql query select multiple values in only one query database table [895], Last Updated: Sat May 18, 2024
wallpaperama
Sat Mar 29, 2008
1 Comments
4952 Visits
if you have multiple selections and instead of making two different queries in mysql you can do one
like this for example:
$sql = "SELECT u.username, p.*, pt.post_text, pt.bbcode_uid, pt.post_subject, p.post_username
FROM phpbb_posts p, users u, phpbb_posts_text pt
WHERE p.topic_id = $topic_id
AND p.poster_id = u.user_id
AND p.post_id = pt.post_id
ORDER BY p.post_time ASC";
this helped me alot i wanted to learn how to do this to select multiples selections in three different tables and fields in my databases
https://www.wallpaperama.com/forums/mysql-query-select-multiple-values-in-only-one-query-database-table-t5881.html