Im having a bit of trouble, I redefined my query and im getting this error,
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\inetpub\wwwroot\ecg\SSL\orders_review.php
here is my query:
$status_query3 = "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";
I ran a if(mysql_query(status_query3){
echo "succesful query";
}else{
echo mysql_error();
}
and i get a successful query
so i know it isnt the query
here is my loop
echo "<table width='100%' cellpadding='3' cellspacing='0' border='0'>";
echo " <tr>";
echo " <td colspan='9'>Pending Accounts = ".$totalorder."</td>";
echo " </tr>";
echo " <tr>";
echo " <th align='left'><strong>Customer Name</strong></th>";
echo " <th align='left'>Billing Email</th>";
echo " <th align='left'>Total Price</th>";
echo " <th align='left'>Date yyyy-dd-mm</th>";
echo " <th align='left'>Package</th>";
echo " <th align='left'>Payment Term</th>";
echo " <th align='left'>Billing Type</th>";
echo " <th align='left'>Domain name</th>";
echo " <th align='left'>Details</th>";
echo " </tr>";
$color1 = "#DDF4FF";
$color2 = "#FFFFFF";
$row_count = 0;
while( $myrow = mysql_fetch_array($result) ){
$row_color = ($row_count % 2) ? $color1 : $color2;
echo " <tr>";
echo " <td bgcolor=".$row_color." nowrap>".$myrow['fname']." ".$myrow['lname']."</td>";
echo " <td bgcolor=".$row_color." nowrap>".$myrow['b_email']."</td>";
echo " <td bgcolor=".$row_color." nowrap>".$myrow['price']."</td>";
echo " <td bgcolor=".$row_color." nowrap>".$myrow['tdate']."</td>";
echo " <td bgcolor=".$row_color." nowrap>".$myrow['package']."</td>";
echo " <td bgcolor=".$row_color." nowrap>".$myrow['billing_term']."</td>";
echo " <td bgcolor=".$row_color." nowrap>".$myrow['payment_method']."</td>";
echo " <td bgcolor=".$row_color." nowrap>".$myrow['domain']."</td>";
echo " <td bgcolor=".$row_color." nowrap><a href='reviewdetails.php?cid=".$myrow['cid']."'><img src='images/lastpost.gif' border='1'></a></td>";
echo " </tr>";
$row_count++;
}
echo "</table>";
so I'm thinking that maybe because my query contains multiple columns with the same name, but i thought that is what defined the foreign key.
please help
=)