My update statement dosn't seem to be updating my database but I'm unsure why, I've used the same code elsewhere in my script and it works fine.
try
{
// update the live documents details
$sth = $conn->prepare("UPDATE docs SET ref = :ref, rev = :rev, updated = :updated WHERE id = :id");
$sth->bindParam(':ref', $ref);
$sth->bindParam(':rev', $rev);
$sth->bindParam(':updated', $date);
$sth->bindParam(':id', $currentid);
$sth->execute();
}
catch(Exception $e)
{
throw new Your_Exception($e->getMessage());
// or
throw $e;
}
I've tried manually inputting a query into the database using PHPMyAdmin just to test I have my table names correct and the query does work as expected.
UPDATE docs SET ref = 'FMS',
rev = 'D',
updated = NOW( ) WHERE id =73
So this leaves me thinking I have an error in my PDO statement. Although the try catch block isn't giving any errors.