jeudi 28 août 2014

join multiple table with specific row


Vote count:

0




i have a question. i want to display nama from table staf that have same nric with nric from table tempahan. i try to do like code below but i just only error Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\New folder\permohonan_stk.php on line 120. can anybody help me?



<?php
include 'include\opendb.php';
$i = "SELECT tempahan.tarikh_mohon, tempahan.tarikh, tempahan.masa_dari, tempahan.masa_hingga, tempahan.dari_daerah, tempahan.hingga_daerah, tempahan.tujuan, tempahan.status, staf.nama, staf.nric
from tempahan, staf
WHERE staf.nric = tempah.nric";
$h = mysqli_query($mysqli, $i);
$row=mysqli_fetch_array($h);



while( $row1 ){

?>

<tr>

<td><center><?php echo $row['tarikh_mohon']; ?></center></td>
<td><center><?php echo $row['nama']; ?></center></td>
<td><center><?php echo $row['tarikh']; ?></center></td>
<td><center><?php echo $row['masa_dari']; ?></center></td>
<td><center><?php echo $row['masa_hingga']; ?></center></td>
<td><center><?php echo $row['dari_daerah']; ?></center></td>
<td><center><?php echo $row['dari_daerah']; ?></center></td>
<td><center><?php echo $row['tujuan']; ?></center></td>
<td><center><?php echo $row['status']; ?></center></td>
</tr>
<?php
}

?>


asked 28 secs ago







join multiple table with specific row

Aucun commentaire:

Enregistrer un commentaire