Closed Bug 283973 Opened 20 years ago Closed 20 years ago

Charts broken: DBD::mysql::st execute failed: Unknown column '$datefrom' in 'field list'

Categories

(Bugzilla :: Reporting/Charting, defect)

2.19.2
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: wicked, Assigned: wicked)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

New Charts are not working on the tip today. Adding &debug=1 produces following
error in the error log:

chart.cgi: DBD::mysql::st execute failed: Unknown column '$datefrom' in 'field
list' [for Statement "SELECT TO_DAYS(series_date) -
TO_DAYS(FROM_UNIXTIME($datefrom)), series_value FROM series_data WHERE series_id
= ? AND series_date >= FROM_UNIXTIME(1103925600) AND series_date <=
FROM_UNIXTIME(1109455200)"] at Bugzilla/Chart.pm line 254

In bug 280499 this line was changed from 
  "  TO_DAYS(FROM_UNIXTIME($datefrom)), " .                       
to
  $dbh->sql_to_days('FROM_UNIXTIME($datefrom)') .
7so this looks like a simple variable quoting error..
Attached patch Fix quotes, V1 (obsolete) — Splinter Review
This patch seems to do the trick..
Attachment #175743 - Flags: review?
Comment on attachment 175743 [details] [diff] [review]
Fix quotes, V1

This looks good. I'd rather it were double-quotes instead of an append, but
hey.
Attachment #175743 - Flags: review? → review+
Target Milestone: --- → Bugzilla 2.20
Oh yeah, this looks much better. And it still fixes charting. :)
Attachment #175743 - Attachment is obsolete: true
Attachment #175764 - Flags: review?(mkanat)
Comment on attachment 175764 [details] [diff] [review]
Fix using using double-quotes, V2

Hooray. :-)
Attachment #175764 - Flags: review?(mkanat) → review+
Status: NEW → ASSIGNED
Flags: approval?
Flags: approval? → approval+
Checking in Bugzilla/Chart.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Chart.pm,v  <--  Chart.pm
new revision: 1.6; previous revision: 1.5
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Presumably this was fallout from the cross-db work?

Gerv
Yeah.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: