I'm working on a super-simple counter for my application. I am able to insert rows using '$date' and '$c' just fine, but updating does not work.
This works:
$c = 8;
$today = date('Y-m-d');
$insert_count = $db->prepare("INSERT INTO COUNTER (COUNTER.date, clicks) VALUES ('" . $today . "', ?)");
$insert_count->execute(array($c));
This does not
$c = 8;
$today = date('Y-m-d');
$update_count = $db->prepare("UPDATE COUNTER SET clicks = clicks + ? WHERE COUNTER.date = '" . $today . "'");
$update_count->execute(array($c));
No errors, nothing.