this is showing all result
but i want to show only if pserialno row is here then it will be show
how can i do this please help me
$result1 = mysql_query("SELECT * FROM workorder where opendate BETWEEN '$a' AND '$b' order by opendate ASC");
while($row = mysql_fetch_array($result1))
{
// echo out the contents of each row into a table
echo "<tr>";
echo '<td>' . $row['opendate'] . '</td>';
echo '<td>' . $row['number'] . '</td>';
echo '<td>' . $row['pserialno'] . '</td>';
but i want to show only if pserialno row is here then it will be show
Just append your WHERE
clause to return only those results where pserialno is not blank.
SELECT * FROM workorder where opendate BETWEEN '$a' AND '$b'
AND pserialno <> ""
ORDER BY opendate ASC