V tomto prípade sa hodí trochu porozmýšľať nad zostavovaním SQL dopytu. A pomôcť si napríklad poliami. Niečo na tento štýl:
Kód:
$where = array();
//teraz pride cas kontroly jednotlivych formularovych prvkov
if($_post['mesto'] != "") {
$where["tabulka.mesto"] = $_post['mesto'];
}
.
.
.
// takto podobne naplnis pole $where a az potom zacnes zostavovat SQL dopyt
$sql = "SELECT * FROM tabulka";
if (count($where) > 0) {
$sql .= " WHERE ";
foreach($where as $key => $value) {
$sql .= " $key = '$value' AND ";
}
$sql = substr($sql, 0, strlen($sql) - 4);
}
.
.
.
mysql_query($sql);
.
.
.
atď
_________________
A. S. Tanenbaum píše:
The terms LF, MF, and HF refer to low, medium, and high frequency, respectively. Clearly, when the names were assigned, nobody expected to go above 10 MHz, so the higher bands were later named the Very, Ultra, Super, Extremely, and Tremendously High Frequency bands. Beyond that there are no names, but Incredibly, Astonishingly, and Prodigiously high frequency (IHF, AHF, and PHF) would sound nice.