$querys = $DB_site->query("SELECT * FROM " . TABLE_PREFIX ."user WHERE homepage IS NULL"); if($DB_site->num_rows($querys)) { echo 'We have results'; while ($query = $DB_site->fetch_array($querys)) { $nom .= "<div>$query[username]</div>"; } } else { echo 'No results'; }