Sure, here is where I think there could be issues:
Code:
/////// Get total user count //////
$userscount=$db->query_first("SELECT COUNT(*) AS users
FROM " . TABLE_PREFIX . "user AS user, " . TABLE_PREFIX . "userfield AS userfield
WHERE userfield.field2=\"West Virginia\" AND userfield.field19!=\"\" AND userfield.field20!=\"\" AND userfield.field9!=\"\" AND userfield.field68!=\"\" AND userfield.field69!=\"\" AND userfield.field71!=\"\" AND userfield.field72!=\"\"
AND user.userid = userfield.userid");
/////// Set up pagination //////
$numberpages = $userscount['users'] / $perpage;
$numberpages = ceil($numberpages);
if (!isset($pagenumber) or ($pagenumber < 1) or ($pagenumber > $numberpages))
$pagenumber = 1;
$pos = ($pagenumber-1) * $perpage;
/////// Get all users //////
$users=$db->query("SELECT *
FROM " . TABLE_PREFIX . "user AS user, " . TABLE_PREFIX . "userfield AS userfield
WHERE user.userid = userfield.userid
WHERE userfield.field2=\"West Virginia\" AND userfield.field19!=\"\" AND userfield.field20!=\"\" AND userfield.field9!=\"\" AND userfield.field68!=\"\" AND userfield.field69!=\"\" AND userfield.field71!=\"\" AND userfield.field72!=\"\"
ORDER BY userfield.field68 DESC
LIMIT $pos,$perpage");
$counter=0;
Is that enough?
--------------- Added [DATE]1237902053[/DATE] at [TIME]1237902053[/TIME] ---------------
Did you need more info than what I posted?