I use a SELECT to get all the rows from the table tblnavigation. The rows are: idnav, idnavcat, prognav, progurl
$rsnav = mysql_query($query_rsnav, $concat) or die(mysql_error()); $row_rsnav = mysql_fetch_assoc($rsnav);
Idnavcat navigasyon kategori için duruyor. Şimdi ben bu "idnavcat" filtrelemek istiyorum; ve bir tablodaki kategori başına sonuçlarını göstermektedir.
<?php do { ?>
<tr>
<td width="10%"><div align="center"><?php echo $row_rsnav['idnav']; ?></div></td>
<td width="70%"><?php echo $row_rsnav['navprog']; ?></td>
<td width="11%"><a href="nav_adj.php?id=<?php echo $row_rsnav['idnav']; ?>"><img src="images/edit.png" alt="" width="32" height="32" border="0" /></a></td>
<td width="8%"><p><a href="nav_del.php?id=<?php echo $row_rsnav['idnav']; ?>"><img src="images/delete.png" alt="" width="32" height="32" /></a></p> </td>
</tr>
<?php } while ($row_rsnav = mysql_fetch_assoc($rsnav)); ?>
I know it's possible with multiple selects; but i know it's slower. Has something to do with "while do" ? Or array ? Not sure; newby here ! :-)
Ben bir dizi üzerinde adım attı; ve bir foreach döngüsü aracılığıyla bunu okudum.
while ($row_rsprog = mysql_fetch_array($rsprog)) {
$data[$row_rsprog['idprog']] = array(
'idprog' => $row_rsprog['idprog'],
'progtitel' => $row_rsprog['progtitel'],
'idnavcat' => $row_rsprog['idnavcat']
);
}
Ve ben onu okudu:
foreach ($data as $id => $va){
echo 'blablabla';
}
But it reads the whole array. I want only to display the arraylines with a specific idnavcat-value. How can this be done ? Thanks for your help !