1 <?php 2 require_once __DIR__ . '/../includes/bootstrap.php'; 3 $q = sanitise(get('q')); 4 if (mb_strlen($q) < 2) json_out([]); 5 $rows = DB::rows( 6 "SELECT id, username, avatar FROM users WHERE username LIKE ? AND suspended=0 ORDER BY username LIMIT 8", 7 [$q.'%'] 8 ); 9 json_out($rows);