28 $this->
id = (int)$a_id;
38 $this->title = $a_title;
56 $this->type_id = (int)$a_type_id;
74 $this->schedule_id = (int)$a_schedule_id;
95 $set = $ilDB->query(
'SELECT title,type_id,schedule_id'.
96 ' FROM booking_object'.
97 ' WHERE booking_object_id = '.$ilDB->quote($this->id,
'integer'));
98 $row = $ilDB->fetchAssoc($set);
118 $id = $ilDB->nextId(
'booking_object');
120 return $ilDB->manipulate(
'INSERT INTO booking_object'.
121 ' (booking_object_id,title,type_id,schedule_id)'.
122 ' VALUES ('.$ilDB->quote(
$id,
'integer').
','.$ilDB->quote($this->
getTitle(),
'text').
139 return $ilDB->manipulate(
'UPDATE booking_object'.
140 ' SET title = '.$ilDB->quote($this->getTitle(),
'text').
141 ', type_id = '.$ilDB->quote($this->getTypeId(),
'integer').
142 ', schedule_id = '.$ilDB->quote($this->getScheduleId(),
'integer').
143 ' WHERE booking_object_id = '.$ilDB->quote($this->id,
'integer'));
155 $set = $ilDB->query(
'SELECT booking_object_id,title,schedule_id'.
156 ' FROM booking_object'.
157 ' WHERE type_id = '.$ilDB->quote($a_type_id,
'integer').
160 while(
$row = $ilDB->fetchAssoc($set))
176 return $ilDB->manipulate(
'UPDATE booking_object'.
177 ' SET schedule_id = '.$ilDB->quote($a_schedule_id,
'integer').
178 ' WHERE type_id = '.$ilDB->quote($a_type_id,
'integer').
192 return $ilDB->manipulate(
'DELETE FROM booking_object'.
193 ' WHERE booking_object_id = '.$ilDB->quote($this->id,
'integer'));
207 $set = $ilDB->query(
'SELECT booking_object_id'.
208 ' FROM booking_object o'.
209 ' JOIN booking_type t ON (o.type_id = t.booking_type_id)'.
210 ' WHERE t.pool_id = '.$ilDB->quote($a_pool_id,
'integer'));
212 while(
$row = $ilDB->fetchAssoc($set))
214 $ids[] =
$row[
'booking_object_id'];