0

这是显示所有结果

但我只想显示 pserialno 行在这里然后它会显示

我该怎么做请帮帮我

$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>';
4

1 回答 1

0

but i want to show only if pserialno row is here then it will be show

只需附加您的WHERE子句以仅返回 pserialno 不为空的那些结果。

SELECT * FROM workorder where  opendate BETWEEN '$a' AND '$b'
AND pserialno <> ""
ORDER BY opendate ASC
于 2013-11-08T07:46:51.680 回答