MyBB Community Forums

Full Version: Calendar add event error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have problem when add event on calendar in my intranet forum. I use myBB 1.4.2, Php 5 and mySql 5. when I submit the event it will said wrong integer value for column timezone on row 1 and yes when I see the sql syntax it value is '' (empty string). my timezone value GMT+7 that I set on datetime setting. anyclue ?
Can you copy and paste here the exact error?
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1366 - Incorrect integer value: '' for column 'timezone' at row 1
Query:
INSERT INTO mybb_events (cid,uid,name,description,visible,private,dateline,starttime,endtime,timezone,ignoretimezone,usingtime,repeats) VALUES ('1','1','Test','Test','1','0','1221990941','1221955200','0','','0','0','N;')

found the answer : Miss the default value for TimeZone
Fix: add this script
$event['timezone'] = $mybb->input['timezone'];
on Input Type "single"

Fix Script :
if($mybb->input['type'] == "single")
{
$event['start_date'] = array(
"day" => $mybb->input['single_day'],
"month" => $mybb->input['single_month'],
"year" => $mybb->input['single_year']
);
$event['timezone'] = $mybb->input['timezone'];
}

But can i do that ?
any confirmation ?
This seems to be a problem only if you have MySQL Strict on. Turning that off is a workaround for this error for now
where do i can turn that off ? at mysql or in the forum ?
How about with additional script above coz it can also solve the problem. i think
Sorry already have the answer, just SET @@global.sql_mode= ''; on SQL Query mode and yes the problem is gone and permission problem on forum is fix too. thanks