How can I write a condition such that if the row wasn’t found to then do something?
My code
$resultt = mysql_query("SELECT * FROM objednavky WHERE kdo = '$kdo' and kdy = '$the_rday'");
while ($roww = mysql_fetch_array($resultt)) {
echo "<form method='post' action=''>
<label for='obb1'>Menu #1 </label>
<input type='text' name='obb1' value='$roww[3]' size='4'><br>
<label for='obb1'>Menu #2 </label>
<input type='text' name='obb2' value='' size='4'><br>
<label for='obb1'>Menu #3 </label>
<input type='text' name='obb3' value='' size='4'><br>
<input type='submit' value='objednat'></form>";
}
And I want to continue like this
...} else {
echo " no match ";
}
Thank you so much for help.
In this case you can use
mysql_num_rows()