Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:
WHERE (CalendarRoleBlock.Blocked = '0' or CalendarRoleBlock.Blocked = 0 or CalendarRoleBlock.Blocked is null )
AND ((Event.StartDate >= '2007-11-01' AND Event.StartDate <= '2007-11-30' ) OR (Event.EndDate >= '2007-11-01' AND Event.EndDate <= '2007-11-30' ))
$sql->AddWhere('CalendarRoleBlock', 'Blocked', '', 0, '=', 'and', '', 1, 1);
$sql->AddWhere('CalendarRoleBlock', 'Blocked', '', 0, '=', 'or', '', 0);
$sql->AddWhere('CalendarRoleBlock', 'Blocked', '', 'null', 'is', 'or', '', 0);
$sql->EndWhereGroup();
$sql->AddWhere('Event', 'StartDate', '', '2007-11-01' , '>=', 'AND', '', 1,1);
$sql->AddWhere('Event', 'StartDate', '', '2007-11-30', '<=', 'AND', '', 1,0);
$sql->EndWhereGroup();
$sql->AddWhere('Event', 'EndDate', '', '2007-11-01', '>=', 'OR', '', 1,1);
$sql->AddWhere('Event', 'EndDate', '', '2007-11-30', '<=', 'AND', '', 1,0);
$sql->EndWhereGroup();
WHERE (CalendarRoleBlock.Blocked = '0' or CalendarRoleBlock.Blocked = 0 or CalendarRoleBlock.Blocked is null )
AND (Event.StartDate >= '2007-11-01' AND Event.StartDate <= '2007-11-30' ) OR (Event.EndDate >= '2007-11-01' AND Event.EndDate <= '2007-11-30' )
$sql->StartWhereGroup() ;
$sql->AddWhere('Event', 'StartDate', '', '2007-11-01' , '>=', 'AND', '', 1,1);
$sql->AddWhere('Event', 'StartDate', '', '2007-11-30', '<=', 'AND', '', 1,0);
$sql->EndWhereGroup();
$sql->AddWhere('Event', 'EndDate', '', '2007-11-01', '>=', 'OR', '', 1,1);
$sql->AddWhere('Event', 'EndDate', '', '2007-11-30', '<=', 'AND', '', 1,0);
$sql->EndWhereGroup();
$sql->EndWhereGroup();WHERE (CalendarRoleBlock.Blocked = '0' or CalendarRoleBlock.Blocked = 0 or CalendarRoleBlock.Blocked is null )
((Event.StartDate >= '2007-11-01' AND Event.StartDate <= '2007-11-30' ) OR (Event.EndDate >= '2007-11-01' AND Event.EndDate <= '2007-11-30' ))if (!empty($sWheres) && substr($sWheres,strlen($sWheres)-1) != '(') {
$sWheres .= $AppendMethod.' ';
}$sql->StartWhereGroup() ;
$sql->AddWhere('Event', 'StartDate', '', '2007-11-01' , '>=', 'AND', '', 1,1);
$sql->AddWhere('Event', 'StartDate', '', '2007-11-30', '<=', 'AND', '', 1,0);
$sql->EndWhereGroup();
$sql->AddWhere('Event', 'EndDate', '', '2007-11-01', '>=', 'OR', '', 1,1);
$sql->AddWhere('Event', 'EndDate', '', '2007-11-30', '<=', 'AND', '', 1,0);
$sql->EndWhereGroup();
$sql->EndWhereGroup();
$sql->AddWhere('CalendarRoleBlock', 'Blocked', '', 0, '=', 'and', '', 1, 1);
$sql->AddWhere('CalendarRoleBlock', 'Blocked', '', 0, '=', 'or', '', 0);
$sql->AddWhere('CalendarRoleBlock', 'Blocked', '', 'null', 'is', 'or', '', 0);
$sql->EndWhereGroup();?WHERE ((Event.StartDate >= '2007-11-01' AND Event.StartDate <= '2007-11-30' ) OR (Event.EndDate >= '2007-11-01' AND Event.EndDate <= '2007-11-30' )) AND (CalendarRoleBlock.Blocked = '0' or CalendarRoleBlock.Blocked = 0 or CalendarRoleBlock.Blocked is null ) , sorry I didn't try, just guess.
if (!empty($sWheres) && substr($sWheres,strlen($sWheres)-1) != '(') {
$sWheres .= $AppendMethod.' ';
}if ($StartWhereGroup) $sWheres .= '('; change to if ($StartWhereGroup) $sWheres .= str_repeat('(', $StartWhereGroup); and remove $StartWhereGroup = ForceBool($StartWhereGroup, 0);
function StartWhereGroup($AppendMethod = '') {
$this->Wheres[] = ' ' . $AppendMethod . ' (';
}
1 to 8 of 8