Jump to content

Changing a value on table


elyfrank
Go to solution Solved by elyfrank,

Recommended Posts

Hi guys,

I know a little bit of PHP but I am very new to mysql.

How do I change the value (meta_value) of all the wp_s2member_login_counter in this table (wp_usermeta) using php?

Thank you very much!

This is what I got so far:

<?php
// Connect to MySQL
$link = mysql_connect('mywebsite.com', 'wrd6rEDgggy', 'password');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db(wrd_47io4f3a6l);

$result = mysql_query("UPDATE wp_usermeta SET wp_s2member_login_counter='0'")
or die(mysql_error());  

?>

post-78656-0-68685100-1363827290_thumb.jpg

Edited by elyfrank
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.