PDO SQL-Status "00000" aber noch Fehler? [Duplikat]

Diese Frage hat hier bereits eine Antwort:

Mein PDO Statement funktioniert nicht 1 Antwort

Kann jemand erklären, warum

$sql->execute($params);

kehrt zurückFALSE, wohingegen

print $pdo->errorCode();
print_r($pdo->errorInfo());

beide kehren zurückSQLSTATE 00000, was heißt laut Dokumentation erfolg? Es ist einINSERT und es wird tatsächlich nichts in die Datenbank eingefügt ... Warum erhalte ich dann eine Erfolgsmeldung von?SQLSTATE?

Falls es hilft, ist dies der Code ...

$sql = $pdo->prepare("
        INSERT INTO user (
            username, fname, pass, salt, email,
            loc_id_home, country_id_home, region_id_home,
            cont_id_home, timestamp_reg, timestamp_upd, timestamp_lastonline, 
            online_status, gender, birthdate
            )
        VALUES (
            :username,:fname,:pass,:random_salt,:email,
            :loc_id_home,:country_id_home,:region_id_home,
            :cont_id_home,'".time()."','".time()."','".time()."',
            1,:gender,:birthdate)
        ");

$params=array(
    ':username'=>$username,
    ':fname'=>$fname,
    ':pass'=>$pass,
    ':random_salt'=>$random_salt,
    ':email'=>$email,
    ':loc_id_home'=>$loc_id_home,
    ':country_id_home'=>$country,
    ':region_id_home'=>$region,
    ':cont_id_home'=>$continent,
    ':gender'=>$gender,
    ':birthdate'=>$birthdate
);  

$sql->execute($params);

print $pdo->errorCode();
print_r($pdo->errorInfo());

Antworten auf die Frage(5)

Ihre Antwort auf die Frage