hi all... pls help me...
i have a problem with my code...
if there is multiple product id in the table tbl_order_item for an order_id. then it should fetch those product id from that table tbl_order_item.
here is my code...
echo $s_country;
$sql2="SELECT prod_id FROM tbl_order_item WHERE order_id='$order_id'";
$res=mysql_query($sql2) or die(mysql_error());
$i=0;
$j="";
while($rs=mysql_fetch_array($res)){
$j .= $rs['prod_id'];
$i++;
}
after fetching... echo $j shows the result as 526527 instead of 526 and 527. i use these two id to fetch their shipping cost from the table tbl_product. here each product have different shipping costs, so i need to fetch the corresponding shipping costs for those id for calculating total price.
here is the code where im trying to fetch the shipping costs.
if(trim($s_country)=='US' || trim($s_country=='United States' )){
$sql3 = "SELECT shipping_us FROM tbl_product WHERE prod_id=".$j;
$res=mysql_query($sql3) or die(mysql_error());
$shipping_cost1=mysql_fetch_object($res);
}
any help pls... tnx in advnc...