Im trying to update my MariaDB with PHP.
As far as I know the statement itself works, but the execute doesnt.
Heres my Code:
And yes, the Variables are declared :)
$pdo = new PDO("mysql:host=localhost;dbname=dbname","user","pass");
$statement = $pdo->prepare("UPDATE dname SET status = :status, text = :text WHERE id = :id");
if ($statement->execute(array(':id' => $id, ':status' => $status, ':text' => $text))){
echo "{success:true}";
} else {
echo "{success:false}";
}
I do have success:false, but nothing from the if above (!statement).
Thanks a lot in advance!