echo-tech Posted July 23, 2013 Share Posted July 23, 2013 Hi, I'm using the following command for my paypal IPN: mysql_query("INSERT INTO `orders` (`id`, `user_id`, `user_name`, `package`, `date`, `exp_date`) VALUES (NULL, '1', 'demo', 'package1', 'NOW()', '{$newdate}')"); I've already assigned the variables and that all works. However, everytime this PayPal IPN script operates, it inserts the row into the database around 21 times? Sometimes it's 26, but sometimes it's 21 etc.. Any idea why? As far as I'm aware there is nothing looping on the system.. Regards, Echo-tech Quote Link to comment https://forums.phpfreaks.com/topic/280426-need-help-database-duplicates/ Share on other sites More sharing options...
KevinM1 Posted July 23, 2013 Share Posted July 23, 2013 It's impossible to tell with seeing just one line of code. Are you executing it in a loop or something? Quote Link to comment https://forums.phpfreaks.com/topic/280426-need-help-database-duplicates/#findComment-1441805 Share on other sites More sharing options...
echo-tech Posted July 23, 2013 Author Share Posted July 23, 2013 (edited) Nope it's not in a loop, it just includes connect.php which is my database connection information and that's been tested and works fine, this is just through PayPal's PHP IPN, so if complete == 1 then it executes the above script, however it's importing loads of rows into the instead of just one. Edited July 23, 2013 by echo-tech Quote Link to comment https://forums.phpfreaks.com/topic/280426-need-help-database-duplicates/#findComment-1441807 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.