latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Retrieve the highest value of a Custom Field

Home Forums Community Forum Retrieve the highest value of a Custom Field

This topic contains 3 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 10 months ago.

Topic Author Topic
Posted: Friday Feb 24th, 2012 at 4:15 am #6239

Hello,

I have created a custom profile field \”businessID\”. Each user in the database has a businessID number assigned to them. How can I query the wp_usermeta table to retrieve the highest businessID value stored in the table?

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Friday Feb 24th, 2012 at 4:39 pm #6328

Hi Joe.

You may find this post by Jason, useful to do what you’re asking: http://www.primothemes.com/forums/viewtopic.php?f=4&t=15658&p=48878#p48878

I hope that helps. :)

Posted: Friday Feb 24th, 2012 at 8:45 pm #6370

Hi Cristian,

I appreciate the link – I actually had a look at this post, but Jason seems to be showing how to retrieve userIDs that have a particular meta value – I actually want to retrieve all the meta-values (business_id) of a particular key _ s2member_custom_field

and find the highest (greatest) one. Any thoughts?

Posted: Friday Feb 24th, 2012 at 10:13 pm #6374

That post gives a good idea on how to query a custom field. You’d have to modify the query to do what you want.

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.