Incredinot Posted August 30, 2010 Share Posted August 30, 2010 Hi.. So im currently working on a script.. My script generates a "oid" based on timestamp. Ive made the "oid" field unique in my db, so if i do a quick refresh i get the message: Duplicate entry '1283195988' for key 'oid' Is there some way i can check if its a dublicate, and if it is + it with 1 or something? Link to comment https://forums.phpfreaks.com/topic/212099-duplicate-entry-help/ Share on other sites More sharing options...
Pikachu2000 Posted August 30, 2010 Share Posted August 30, 2010 INSERT . . . ON DUPLICATE KEY UPDATE Link to comment https://forums.phpfreaks.com/topic/212099-duplicate-entry-help/#findComment-1105314 Share on other sites More sharing options...
Incredinot Posted August 30, 2010 Author Share Posted August 30, 2010 Awsome, thanks alot! Link to comment https://forums.phpfreaks.com/topic/212099-duplicate-entry-help/#findComment-1105315 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.