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? Quote 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 Quote 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! Quote Link to comment https://forums.phpfreaks.com/topic/212099-duplicate-entry-help/#findComment-1105315 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.