$q = $con->prepare("INSERT INTO messages (time, sender_id, recipient_id, read, subject, content, status) VALUES (?, ?, ?, ?, ?, ?, ?)");
$q->execute(array($date->format('U'), $ID, $_POST['to'], "0", $_POST['subject'], $_POST['content'], 1));
$count = $stmt->rowCount();
echo $count;
This code does not actually insert anything in the database. No error, and it even echo's 1, meaning it did work. But nothing shows up in my database.
If i add: or die(print_r($stmt->errorInfo(), true))
to the end of the execute line, it outputs: Array ( [0] => 00000 [1] => [2] => )
which I'm not really sure what that means.
Any idea? I know how pdo works and really can not figure this out.