Hi Please tell me this code is correct: $query=SELECT res_restaurents.restaurentName, res_restaurents.restaurentZip , res_restaurents.restaurentCity , res_restaurents.restaurentState , res_restaurents.restaurentCountry ,res_restaurents.iD , coupons_menus.res_id, coupons_menus.couponname ,coupons_menus.code ,coupons_menus.details FROM res_restaurents, coupons_menus WHERE res_restaurents.iD=coupons_menus.res_id $result=mysql_query($query) or die(mysql_error()); echo mysql_num_rows($result); while($row=mysql_fetch_array($result)){ echo $row['coupons_menus.couponname']." is for ".$row['res_restaurents.iD']; } PHP: mysql_num_rows returns 4 but no data is visable Thank you
Hi, try: $query='SELECT res_restaurents.restaurentName, res_restaurents.restaurentZip, res_restaurents.restaurentCity, res_restaurents.restaurentState, res_restaurents.restaurentCountry, res_restaurents.iD, coupons_menus.res_id, coupons_menus.couponname, coupons_menus.code, coupons_menus.details FROM res_restaurents,coupons_menus WHERE res_restaurents.iD=coupons_menus.res_id'; $result=mysql_query($query) or die(mysql_error()); echo mysql_num_rows($result)."<br />"; while($row=mysql_fetch_array($result)) echo $row['couponname'].' is for '.$row['iD'].'<br /><br />'; PHP: Regards