Hi istoryans please tabangi ko and akong code kay dili sya mo display sa $row['product_name'] wala man unta koy problem nga na encounter completely blank jud sya, anyways seperate sila ug tables mao duha ka parameters ug pag query akong gigamit please help me!
I'm having trouble displaying the $row[product_name] it says blank while the $row2['index'] seems to be doing fine all the data is being display, what seems to be the problem here? or it is illegal to put two parameters in while statement , any insights?
heres my code.
Code:
$sql = mysql_query("SELECT * FROM product_detail LIMIT 5") or die(mysql_error());
$sql2 = mysql_query("SELECT * FROM product LIMIT 5") or die(mysql_error());
if($sql && $sql2){
while($row = mysql_fetch_array($sql) && $row2 = mysql_fetch_array($sql2)){
$product_name = $row["product_name"]; echo $row["product_name"] ;
$product_id = $row2["product_id"];
$product_qty = $row2["balance_qty"];
$product_price = $row2["unit_price"];
echo ' <tr>
<td>'.$product_id.'</td>
<td>'.$product_name.'</td>
<td>'.$product_price.'</td>
<td>'.$product_qty.'</td>
</tr><br/>';
}