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.

MySQL-Export from wp_s2member_custom_fields

Home Forums Community Forum MySQL-Export from wp_s2member_custom_fields

This topic contains 1 reply, has 1 voice. Last updated by  Maik Rico y Gomez 3 years, 9 months ago.

Topic Author Topic
Posted: Wednesday Mar 20th, 2013 at 10:22 am #45230

Hi @ all,

I just tried to export some usermeta from the WP “wp_s2member_custom_fields” – Database. I have 900 users – some of them have Quotes and Double-quotes in their custom fields. The DB looks all right and has all serialized Data WITH all Quotes in it.
But when I try to export my userlist with its custom fields, only users without quotes are displayed? I tried the “unserialize” command but that didn’t work.

Could someone help me, because I’ve tried nearly everything but nothing works. Google drops nothing useful :(

Here’s my code:

$query = "SELECT meta_value FROM wp_usermeta WHERE meta_key = 'wp_s2member_custom_fields'";
$result = mysql_query($query)
or die("ERROR connecting DB");

while ($line = mysql_fetch_assoc($result)) 
{ 
    $pickthis = $line[meta_value];
    $showme = unserialize(utf8_encode($pickthis));

    echo utf8_decode($showme['vita']);
}

Thans a lot for helping me out!!!The Field “vita” is a text-area!!

Greets

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Friday Mar 22nd, 2013 at 6:15 am #45468

Ok, i’ve managed to use “string replace” to display quotes! Now I have another Problem:
Users, who paste WORD-formated Text into the Input-Fields, create DB-Errors!! How can I solve this? Is there a solution to replace the „“ with the “normal” ones like ” ”

Any ideas?
PLEASE HELP!

Viewing 1 replies (of 1 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.