Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $wherea[] = "name LIKE '%" . htmlsafechars($searchstr) . "%'";
- $where = (is_countable($wherea) ? count($wherea) : 0) > 0 ? 'WHERE '.implode(' AND ', $wherea) : '';
- $res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT COUNT(id) FROM downloads $where AND category NOT IN (45,46,57)") or sqlerr(__FILE__, __LINE__);
- $row = mysqli_fetch_row($res);
- $count = (int)$row[0];
- if ($count){
- $query = "SELECT id, search_text, category, sticky, name, vip, times_completed, size, added, type, anonymous, descr, numfiles, filename, owner FROM downloads $where $orderby {$pager['limit']}";
- $res = mysqli_query($GLOBALS["___mysqli_ston"], $query) or sqlerr(__FILE__, __LINE__);
- }else{
- unset($query);
- }
Advertisement
Add Comment
Please, Sign In to add comment