I want to make a condition that returns true if there are results. How do I do it?
$result = mysql_query("SELECT * FROM `Groups` WHERE `City` = '$city2' LIMIT 12 OFFSET 6");
if (the condition) {
while($row = mysql_fetch_array( $result )) { ?>
<a href="/?ciudad=<?php echo $city; ?>&colegio=<?php echo $row['Group']; ?>" class="<?php if ($group == $row['Group']) { echo "selected"; } ?>"><?php echo $row['Group']; ?></a> <?
}
}
Thanks
1 Answer