This code puts out what I search for fine:
$result = mysql_query("SELECT * FROM mytable WHERE id = $variable");
while($row = mysql_fetch_array($result)){
echo $row["id"];
echo "<br>";
echo $row["name"];
echo "<br>";
}
What I can't figure out is if there is no id $variable in the table, how do I get it to come back and:
echo "nothing found";
I'd guess its some sort of 'if' statement, but I don't know exactly how to construct it in this case.
