0

hello can someone please help me, i been trying with this query for long time, not working! it insers nothing into the table,

$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();
u_mulder
  • 54,101
  • 5
  • 48
  • 64

0 Answers0