what im trying to do is combine 5 tables into 1 temp table, now here is my select statement
$query2 ="select *
from
customer
join hosting_info
on (customer.status=hosting_info.status)
left join billing
on (customer.status=billing.status)
right join billing_status
on (billing.status=billing_status.status)
join orders
on (customer.status=orders.status)
where customer.status='1'";
ok now there are 2 records with the status of '1'.
now i want it in a repeating table on my page here is the code for that
while( $myrow = mysql_fetch_assoc($result) ){
echo " <tr>";
echo " <td>".$myrow['fname']." ".$myrow['lname']."</td>";
echo " <td>".$myrow['b_email']."</td>";
echo " <td>".$myrow['status']."</td>";
echo " <td><a href='reviewdetails.php?cid=".$myrow['cid']."'><img src='images/lastpost.gif' border='1'></a></td>";
echo " </tr>";
ok now what i am getting as a result is 48 rows, it posts 24 resutls for the first record and then 24 for the second record
what is going on here?
i thought that the joins i used made all the records availible in 1 temp table, which then i can loop through to show the result.
am i making any sense? =)
i know im doing something wrong but i cant see it.
any help will be greatly appreciated!