Jump to content

Recommended Posts

Hi everyone!

I have a website that uses mysql/phpmyadmin for an auto update survey. For the different fields, I have people who enter the same thing but in different ways, for example:

User 1: Econ
User 2: Economics
User 3: Economics Masters

User 1: U of Cal-Berkeley
User 2: Berkeley
User 3: University of California-Berkeley

I'd love a way to clean up how everything looks, because it also affects the sort. So, I'm basicly asking, is there a way for me to put an auto clean up where someone who enters "Econ" automatically has their entry turned to "Economics" or "U of Cal-Berkeley" to "Berkeley" in the database?

Thanks :)
Link to comment
https://forums.phpfreaks.com/topic/4850-auto-clean-up-for-database/
Share on other sites

Yes, it's called normalization, specifically, third normal form. Do a google search for it.

The over all gist of it is to have a seperate table that stores the values, which those values are presented to the user...so the user can only select the ones that you have presented to them, which elminates them making mistakes.

Aside from normalizing your db, there is no good way of doing what you want "automatically".
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.