I am looking to alter a db table.
I want to alter the table specifically the row membership_id, status varchar(20), and a change the end date.
This is wp_pmpro_memberships_users table if anyone is familiar.
I want to keep the same membership_id which is 9 but update the status from expired to active and give it a new end date
Any help appreciated.
Cheers
J
2
Answers
Thanks Ryan, this was to alter more than 1 row though.
I used....
UPDATE wp_pmpro_memberships_users SET status = 'active' WHERE membership_id = 12;
UPDATE wp_pmpro_memberships_users SET enddate = '2021-04-17 15:00:00' WHERE membership_id = 12;
Which worked :)
However I now want to move alter membership_id = 12; to membership_id = 21;
287 rows in this so doing one by one would take ages, there must be an alter to do this?
If your host has it available, you can edit the database directly using phpmyadmin. It is pretty common software if you are running a cPanel host. I would recommend taking a backup of your database before making alterations directly. But you can: