I have been flogging this for 3 hours, I know it is not entirely on topic but will someone please tell me why the code below gets error:
DBD::mysql::st execute failed: You have an error in your SQL syntax near 'month = '3' day = '16' time_start = '12:00 PM' time_end = '01:00 ' at line 4 at db.pl line 653.
I have checked and rechecked Cheetah and Kingfisher manuals and read the pod and checked the data in the arrays, combined the arrays, ditched the arrays and used bind_params just to see the one to one correspondance, added commas between the SET params, and googled my brains out. Help.
TIA
jg
$sth = $dbh-> prepare("UPDATE $calendar_table
SET
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 = ?
");
_____________________________________________________Think a race on a horse on a ball with a fish! TG
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.