Jump to content

Archived

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

meridionale

Auto-Clean Up for Database?

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 :)

Share this post


Link to post
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".

Share this post


Link to post
Share on other sites

×

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.