你好,有人可以帮助我,我一直在尝试这个查询很长一段时间,不工作!它没有任何东西进入表格,
$query= $pdo->prepare('INSERT
IGNORE INTO `software-bsaez`( `hizb` ,`type3`, `username`,`wilaya`,`commune`)
SELECT ?,?,?,?,?
FROM dual
WHERE NOT EXISTS
(
SELECT *
FROM `software-bsaez`
WHERE hizb= ?
AND type3 = ? AND wilaya = ? AND commune = ?
');
$query->bindValue(1,$hizbname);
$query->bindValue(2,$type3);
$query->bindValue(3,$username);
$query->bindValue(4,$user_data['wilaya']);
$query->bindValue(5,$user_data['commune']);
$query->bindValue(6,$hizbname);
$query->bindValue(7,$type3);
$query->bindValue(8,$user_data['wilaya']);
$query->bindValue(9,$user_data['commune']);
$query->execute();