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

Wednesday, February 2, 2022

[FIXED] Undo the effects of changing meta_key from Varchar to int

 February 02, 2022     database, meta-key, phpmyadmin, wordpress     No comments   

Issue

I was trying to edit the email form field so that it accepts int values like of a phone number. I knew very less about how database values work and this is what i did: 1. Figured out that email field was "hrb_email" 2. Found that in wp_metauser hrb_email is a meta_key 3. Went to structure> and changed the meta_key from varchar to int.

Result: I cant find hrb_email in wp_metauser any more. Wordpress dashboard shows no users. Although wp_users has my user details. Also, on my website, I can see user if I manually put the URL for those users but I cant find them on the list on my website.

Please advice. Note: changing the meta_key value back to varchar does not help.

This is what meta_key looks likeChanged back to varcharI cant find hrb)email under meta_key anymore


Solution

Updated the meta_key fields manually for each user. To achieve this, I created a couple of new users and understood what values belonged to the key fields. From that, i started updating the meta_key field manually. It worked for all the users, except that i had to update password on Wordpress>dashboard>users>edit.



Answered By - shrbisht
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

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