I have a problem, I use pdo to create queries in my mysql database. When I want to insert only one record in my table, this insert TWO rows.
I donβt know why to insert two when you need to insert only one. This is the php code:
<?php $db = new PDO("mysql:host=localhost;dbname=mydatabase", "root", ""); $sql = "INSERT INTO test(lala)VALUES('xx1')"; $db->query($sql); ?>
source share