PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, December 29, 2021

[FIXED] Add +15 additional days to several dates en masse in mysql PHPmyadmin?

 December 29, 2021     mysql, phpmyadmin     No comments   

Issue

Hello I hope you can help me, I know I can do it manually but there are more than 200 users. I have these expiration dates to which I need to add an additional +15 days. How could I do it in bulk in mysql PHPmyadmin?

The data is in the table: wp_usermeta

wp_usermeta


Solution

Since meta_value is a longtext, you can convert it to date and format it back afterwards.

UPDATE wp_usermeta SET meta_value = date_format(date_add(str_to_date(meta_value,'%Y-%m-%d'),interval 15 day), '%Y-%m-%d') WHERE meta_key = 'user_payment_expired_date';


Answered By - Alaister
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing