I find many examples of else or if or elseif for query.
Can this statement or something similar be used inside the output of a fields values in PHP?
My example of the question Im asking,
if $make is true, or false do query.. but what Im looking for would take an echo "$id"; of a field, if no record exists echo "$this";
if ($make) {
$query = "SELECT FROM model WHERE make LIKE '$asd' LIMIT 0";
} else {
$query = "SELECT FROM model WHERE make LIKE '$asd' LIMIT 1"; }
$result = mysql_query($query);
$number = mysql_numrows($result);
{
for ($i=0; $i<$number; $i++) {
$make=mysql_result($result,$i,"make");
$id=mysql_result($result,$i,"id");
echo "$make<br>";
echo "$id";
}}
just curious