By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,960 Members | 990 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,960 IT Pros & Developers. It's quick & easy.

Moving data from one table to another without duplicates

P: 8
Hello everyone,

I ran into a big design flaw in this software I'm writing in PHP and MySQL. I'll try to explain this the best I can:

I have a table let's call it "claims" it has all of the clients claim information but also has attorney information and insurance information in it.

Now my client is asking me to set this up to where I can get statistics based on either the insurance company or the attorney via a dropdown menu or a search.

My big boo boo on this was I probably should've made an attorney's table and an insurance table and stored that information separately to do this.

(On a side note they kind of want a drop down that works to where they start typing the name in and it gives you a list like how google works, I imagine that's ajax and I'm new to that so any advice on how to learn that would be helpful too)

So I imagine right now that the best way to do this is write a small PHP script that grabs the information from the insurance and attorney fields from the claims table and separate them into their respective tables? Or is there an easier way to do this?

Also what is the best way to check to see if a record exists before adding a new record?

I wrote myself into a corner on this one and it's stressing me out.

Thanks!
May 4 '16 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.