It is not falling into my if loop if rows are < 0?
<form action="sv_t4.php" method="post">
<tr>
<th rowspan="10">
<p align="left"><font face="Arial, Helvetica, sans-serif" color="#0000A0">Click o<font color="#993300"></font>n the Window of your interest: </font><br>
<select name="cbowindow" size="8" class="listbox">
<?php
/
Create your SQL statement
/
$sql="SELECT inv_no, win_no from tbl_stglass WHERE par_no= $inst_ch order by inv_no;";
$result_set = pg_Exec ($conn, $sql);
$rows = pg_NumRows($result_set);
if ((!$result_set) || ($rows < 1)) {
//No connection or no rows returned, so print an error
echo "ERROR - no rows returned";
exit; //exit the script
}
for ($j=0; $j < $rows; $j++) {
echo "<option value=".pg_result($result_set, $j, "inv_no")."> ".pg_result($result_set, $j, "inv_no")."</option>";
}
?>
</select>
<input name="submit" type="submit" value="Edit Window">
</form>