where are custom field values stored?
Posted:
January 6th, 2012, 1:16 pm
by epixmedia
Hi All - I'm just wondering where the S2member custom field information is stored? I have a select list with 20 or so options and I want to call it on my custom membership page using PHP.
If I know where the values are stored I can just pull them from the database - writing the PHP code isn't an issue.
Thanks
Zoe
Re: where are custom field values stored?
Posted:
January 7th, 2012, 6:09 am
by Cristián Lávaque
I think they go in the options table. Did you look there?
Re: where are custom field values stored?
Posted:
January 7th, 2012, 7:00 am
by epixmedia
Hi Cristian, Ah yes, must have missed it the first time, its stored against the option_name ws_plugin__s2member_options
It's in the option_value field with everything else like this:
{"section":"yes","sectitle":"Membership","id":"membership_type","label":"Membership Type","type":"select","deflt":"","options":"Small (L)|Full member - (L) small £500 + VAT\nSmall (M)|Full member - (M) small £1000 + VAT\nSmall (U)|Full member - (U) small £1500 + VAT\nMedium (L)|Full member - (L) medium £2000 + VAT\nMedium (M)|Full member - (M) medium £2500 + VAT\nMedium (U)|Full member - (U) medium £3000 + VAT\nLarge|Full member - Large £3500 + VAT\nCorporate|Corporate member £6000 + VAT\nAssociate|Associate member £250 + VAT\nLegal Forum (L)|Legal Forum £590 + VAT\nLegal Forum (M)|Legal Forum £1180 + VAT\nLegal Forum (U)|Legal Forum £1770 + VAT","expected":"","required":"yes","levels":"all","editable":"yes","classes":"","styles":"","attrs":""}
Any idea how I would extract the list using sql...? I've managed to create my member list from the wp_usermeta table using regex but its not a method I'm really very familiar with. I ideally need the sql to call the individual values as a new row so I can use a "for each" to wrap it in html...
Thank you,
Zoe
Re: where are custom field values stored?
Posted:
January 9th, 2012, 8:48 am
by epixmedia
Is anyone able to help with this pretty please?
Zoe
Re: where are custom field values stored?
Posted:
January 12th, 2012, 5:34 am
by Cristián Lávaque
You mean like what Jason suggests here?
viewtopic.php?f=4&t=15658
Re: where are custom field values stored?
Posted:
January 12th, 2012, 8:08 am
by epixmedia
Hi Cristian, not quite, I know how to search my member database, but I want to know how to call back a custom select list I have created from the database and format it back in to a select list by wrapping the sql result in html... its the sql query part I am having trouble with...
Zoe