Cast sync_contentid to unsigned int

This commit is contained in:
Nathan Gray 2010-03-06 02:40:57 +00:00
parent cb5054f2e4
commit 11183a763d

View File

@ -422,7 +422,7 @@ class calendar_so
// changed the original OR in the query into a union, to speed up the query execution under MySQL 5 // changed the original OR in the query into a union, to speed up the query execution under MySQL 5
$select = array( $select = array(
'table' => $this->cal_table, 'table' => $this->cal_table,
'join' => "JOIN $this->dates_table ON $this->cal_table.cal_id=$this->dates_table.cal_id JOIN $this->user_table ON $this->cal_table.cal_id=$this->user_table.cal_id LEFT JOIN $this->repeats_table ON $this->cal_table.cal_id=$this->repeats_table.cal_id JOIN egw_api_content_history ON egw_api_content_history.sync_appname = 'calendar' AND egw_api_content_history.sync_contentid=$this->cal_table.cal_id", 'join' => "JOIN $this->dates_table ON $this->cal_table.cal_id=$this->dates_table.cal_id JOIN $this->user_table ON $this->cal_table.cal_id=$this->user_table.cal_id LEFT JOIN $this->repeats_table ON $this->cal_table.cal_id=$this->repeats_table.cal_id JOIN egw_api_content_history ON egw_api_content_history.sync_appname = 'calendar' AND CAST(egw_api_content_history.sync_contentid AS UNSIGNED)=$this->cal_table.cal_id",
'cols' => $cols, 'cols' => $cols,
'where' => $where, 'where' => $where,
'app' => 'calendar', 'app' => 'calendar',