hi,
i have the following:
when there is a value in the "site" form field the query retrieves records related to that site. i would like to know if there is a way the query can retrieve ALL results when the "site" form field is empty?
thanks in advance,
geebee
i have the following:
Code:
$T_GROUP = $_POST["T_GROUP"]; $site = $_POST["site"]; .... $sql="SELECT day, field1, field3, field4, field5 FROM qry_sum WHERE field3 = '".$T_GROUP."' AND field2 LIKE '".$site."' AND day = 'SUNDAY'; $rs=odbc_exec($conn,$sql); if (!$rs) {exit("Error in SQL");} while (odbc_fetch_row($rs)) { $SFT=odbc_result($rs, shift); $BER=odbc_result($rs, infocount); $TTLS=odbc_result($rs2, ttl); $TTLGRAND=odbc_result($rs3, ttl_GRAND); print "<br>"; echo $SFT;
thanks in advance,
geebee
Comment