mysql inserting records twice in database
问题 I have the simple code shown below. After it has run once, it inserts the results into MySQL database twice. It is working fine in all browsers (IE, Chrome, and Safari) except Firefox. I am using symfony php framework and propel as the ORM. $con = Propel::getConnection(); $sql = "select * from tmp where user_id =$userid"; $stmt = $con->prepare($sql); $stmt->execute(); while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $insert_sql = "INSERT IGNORE into library(xxx,xxx) VALUES('xyz','xys')";