I'm trying to pull information and display it in a table form on a php page i have a mysql DB i have something like below which list everything in the table but i would like to have it only show certain information if a certain data is present
Columns i would like to display on the page
object_id, Name and, wish.
but i only want rows from the DB to be displayed if a column
wishState is ("pending")
this is what i have scoured around to find so far wich brings everything in.
$query="SELECT * FROM MY_TABLE";
$results = mysql_query($query);
while ($row = mysql_fetch_array($results)) {
echo '<tr>';
foreach($row as $field) {
echo '<td>' . htmlspecialchars($field) . '</td>';
}
echo '</tr>';
}
Thanks Ryan