Wallpapers Forums Login

Mysql Query Select Multiple Values In Only One Query Database Table

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

tags: muti multiple
Guest Tue Nov 11, 2008
pretty neat !

Related Content

Information

Share

wallpaperama | Wallpapers | Forums | Terms Of Service

copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5