If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > duplicate records

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-28-04, 18:33
Alpha-j Alpha-j is offline
Registered User
 
Join Date: May 2004
Posts: 1
duplicate records

Hello i am pretty new to this so go easy on me.

I have a working db with a php front end, the query to view the data works fine. As does the query to update the records (most of the time) during testing i have discovered for no reason that i can see when you update a record it creates a duplicate record. When i view the database throught the mysql admin there are 2 records that are the same. If i go and edit the 1st record with the web front end it updates both any ideas as to why this is ?

I know the 1st answer i get will be to use a unique key of some sorts but i have no fields that could be unique (at least not currently)

Ok here is my theory for a unique key that i need.

I have a user ID week number and Year each ID should only have one entry per week per year
but each ID will have multiple entries per year
so i thought of ID+week+year would be unique so i need to know how (assuming its possible) to take 3 fields and combine them in to one field called key
the 3 other fields are called cse_id week_no and year

TIA
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On