PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
carblanco wrote:Can anybody help me with this newie question?
Right now I hava a list ordered as:
- Code: Select all
$query = "
SELECT $wpdb->users.ID, $wpdb->users.user_nicename
FROM $wpdb->users
INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id
WHERE $meta_values
ORDER BY $wpdb->users.ID LIMIT $offset, $limit";
And what I need is ordering by a s2member custom field called "company name". How?
Thanks.
$query = array("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
ksort($query);
foreach ($query as $company_name => $val) {
echo "$company_name = $val\n";
}
$users_with_company_field = array(
'The Company' => array(/* All this user's data you got with your query */),
// More users...
);
Users browsing this forum: No registered users and 1 guest