MDanz Posted June 28, 2010 Share Posted June 28, 2010 the belwo code is causing two records to be inserted into mysql. I have no idea why. when i remove it no record is entered. When i add it two duplicate records are entered. Any idea? query2 = "INSERT INTO Stacks"; $query2 .= "(`username`,`reply`,`number`,`ip`,`posted`,`origin`,`keywords`,`avatar`,`Positive`,`Negative`) VALUES ('$usernames','$info','$idtwo','$ip',NOW(),0,'$keywords','$avatarreply','0','0')"; $results2 = mysql_query($query2); Quote Link to comment https://forums.phpfreaks.com/topic/206105-mysql-query-duplicate-records/ Share on other sites More sharing options...
dabaR Posted June 28, 2010 Share Posted June 28, 2010 The problem is not very likely in the SQL you've shown, but rather in the environment it lives in. Quote Link to comment https://forums.phpfreaks.com/topic/206105-mysql-query-duplicate-records/#findComment-1078388 Share on other sites More sharing options...
MDanz Posted June 29, 2010 Author Share Posted June 29, 2010 nvm Quote Link to comment https://forums.phpfreaks.com/topic/206105-mysql-query-duplicate-records/#findComment-1078529 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.