Closed freejoe76 closed 8 years ago
This happens when a resort isn't open yet -- its basedepth_in, topdepth_in
fields are blank, creating invalid sql such as
INSERT INTO report
( skiarea_id, newsnow_24_in, newsnow_48_in, newsnow_72_in, basedepth_in, topdepth_in, conditions, numliftsopen, numliftstotal, perliftsopen, numberofruns, acresopen, kmxc, eventnotices, cc_facilities, cc_numberoftrails, cc_kmopen, cc_kmtrackset, cc_kmskategroomed, sb_parkresshaped, sb_piperecut, sb_hits, sb_pipes, basetemperature_f, basetemperature_c, baseweather, lastupdate, open )
VALUES ( 20, 0, 0, 1, 18, 18, 'Machine Made, Packed Powder', 1, 0, 0, '2', 38, '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '20', 0, 'Partly Cloudy', STR_TO_DATE('2015-11-09T14:48:02Z', '%Y-%m-%dT%H:%i:%s'), '' ),
( 25, 0, 0, 0, , , 'N/A, N/A', , 0, , '', 0, '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', 0, '', STR_TO_DATE('2015-11-05T17:11:38Z', '%Y-%m-%dT%H:%i:%s'), '' ),
(final line is the invalid sql, 5th and 6th items in the insert)
Also erroring: numliftsopen, perliftsopen
Yea! http://www.denverpost.com/skireport is live!
ERROR 1064 (42000) at line 2: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' , 'N/A, N/A', , 0, , '', 0, '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', 0, '', STR_' at line 3