just curious if you can loop through a equi-join query?
my query is this
$status_query2 = "SELECT
c.fname, c.lname, c.b_email, c.cid, c.status, o.status, o.price, h.status,
b.status, h.billing_term, h.domain, b.payment_method o.tdate, o.status FROM
customer c, orders o, hosting_info h, billing b
WHERE c.status = 1 AND o.status = 1 AND b.status = 1 AND h.status = 1";
$result = mysql_query($status_query2);
and i want to loop through it to display the results in a table like
while( $myrow = mysql_fetch_array($result){
echo $myrow['fname'];
echo $myrow['lname'];
etc... ect....
}
I've tried and i get this error:
mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\inetpub\wwwroot\ecg\SSL\orders_review.php on
any suggestions?
can you loop through a equi-join query?
Moderator: General Moderators
looping through the join is definitely doable.
try doing some error checking before the fetch_array...
try doing some error checking before the fetch_array...
Code: Select all
$result=mysql_query($status_query2) or die(mysql_error());Sherdog:
If you are copy-n'-pasting your code directly, you have an error...
If you are copy-n'-pasting your code directly, you have an error...
Code: Select all
//yours:
while( $myrow = mysql_fetch_array($result){
//right:
while( $myrow = mysql_fetch_array($result) ) {