bonsoir

j' ai um souci sur une requete en pdo

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
    $sql_history = "INSERT INTO `phplist_user_user_history` (`id`, `userid`, `ip`, `date`, `summary`, `detail`, `systeminfo`) VALUES (NULL, :userid, :ip, 'NOW()', 'Import_by_script', 'subscription', 'HTTP_USER_AGENT = :useragent REMOTE_ADDR = :ip2')";
        $stm2 = $db->prepare($sql_history);
 
        $stm2->bindParam(':userid', $userid); 
        $ip = get_client_ip();       
        $stm2->bindParam(':ip', $ip);        
        $stm2->bindParam(':useragent', $_SERVER['HTTP_USER_AGENT']);
        $stm2->bindParam(':ip2', $ip); 
        $res = $stm2->execute();
je me retrouve avec le message:
Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in
j'ai pourtant le même nombre de parametre?