Jump to content

Changing a value on table


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

Link to comment
https://forums.phpfreaks.com/topic/275949-changing-a-value-on-table/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.