in reply to
Current version of code used to produce trace() results above in thread
in thread DBI SQL Syntax Problem
In the above SQL you (still) have commas in your WHERE clause.
the SQL below should be valid, assuming that the values you are binding
conform to the column data types. (Note that the last comma after e_time set is invalid preceeding the WHERE.)
One thing that works well for me when confronted by sql coding problems is to
create the SQL standalone and execute it (for instance via SQLPlus (or mySQL equivalent))
until it's syntactically correct, then take that SQL and implement it.
I suspect among other things, the '12:00 PM' has a problem with the space-PM, and
time_end = '01:00 ' has issues with the trailing space (chomp?).
$sth = $dbh-> prepare("UPDATE $calendar_table
year = ?,
month = ?,
day = ?,
time_start = ?,
time_end = ?,
title = ?,
location = ?,
description = ?,
category = ?,
posted_by = ?,
post_date = ?,
b_time = ?,
e_time = ?
WHERE year = ?
AND month = ?
AND day = ?
AND time_start = ?
AND time_end = ?
AND title = ?