UBB.Dev
Posted By: poil Select Information from two tables - 01/08/2001 12:02 AM
how exaclty do you grab information from two tables. for example from table fav, i want to grab the fusername and fbnumber WHERE the fusername = $Username and fbnumber = $number. And i want to grab the information subject, last post, replies, and views from the table w3t_posts WHERE fbnumber = $number.

i have no idea how to do that. thanks for helping!

[:red]--------------
http://extremeforums.org/index
Posted By: poil Re: Select Information from two tables - 01/08/2001 12:26 AM
figured it out.

$query = "SELECT fav.fusername,fav.fbnumber,w3t_Posts.B_Subject,w3t_Posts.B_Replies,w3t_Posts.B_Username
FROM fav,w3t_Posts
WHERE fav.fusername = '$Username'
AND fav.fbnumber = B_Number";

[:red]--------------
http://extremeforums.org/index
© UBB.Developers