Sounds like you will have to change the structure of your table. I would
add an auto-increment column at the beginning of the row and use that as
the primary key. You can still select on the horse, course etc. like so

SELECT * FROM horse_and_courses WHERE <selection criteria> ORDER BY
new_primary_key DESC LIMIT 1;

This would return you the most recent record. The auto_increment column
would be updated automatically during the import.

Regards


---------------------------------------------------------------
********** _/     **********  David Logan 
*******   _/         *******  ITO Delivery Specialist - Database
*****    _/            *****  Hewlett-Packard Australia Ltd
****    _/_/_/  _/_/_/  ****  E-Mail: [EMAIL PROTECTED]
****   _/  _/  _/  _/   ****  Desk:   +618 8408 4273
****  _/  _/  _/_/_/    ****  Mobile: 0417 268 665
*****        _/       ******    
******      _/      ********  Postal: 148 Frome Street,
********   _/     **********          Adelaide SA 5001
                                      Australia 
i    n    v    e    n    t                                   
---------------------------------------------------------------

-----Original Message-----
From: wizard007 [mailto:[EMAIL PROTECTED] 
Sent: Friday, 11 August 2006 5:30 PM
To: [email protected]
Subject: Problem with updating table


I have a site with horse racing results and the results table consists
of:
Date, Time, Course, Horse, Odds, Result, Profit

I have about 6 months results in there and obviously there are no unique
fields.
Each morning I imprt a new spreadsheet with the days racing selections
without the odds and result field filled in. As the day goes on I use a
page
to update the results but when I update a race with horse that has run
in
the past it updates the new record and the old record as well. I now
have 2
identical records as the data updates has overwritten the old record for
the
horses race before.

Any ideas!?!?!?!?
-- 
View this message in context:
http://www.nabble.com/Problem-with-updating-table-tf2089249.html#a575833
9
Sent from the MySQL - General forum at Nabble.com.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to