ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
class.ilBookingManager8HotfixDBUpdateSteps.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\BookingManager\Setup
;
22
23
class
ilBookingManager8HotfixDBUpdateSteps
implements
\ilDatabaseUpdateSteps
24
{
25
protected \ilDBInterface
$db
;
26
27
public
function
prepare
(\
ilDBInterface
$db
): void
28
{
29
$this->db =
$db
;
30
}
31
32
public
function
step_1
(): void
33
{
34
$db
=
$this->db
;
35
$set1 =
$db
->
queryF
(
36
"SELECT * FROM booking_object "
.
37
" WHERE schedule_id = %s "
,
38
[
"integer"
],
39
[1]
40
);
41
while
($rec1 =
$db
->
fetchAssoc
($set1)) {
42
$set2 =
$db
->
queryF
(
43
"SELECT * FROM booking_schedule "
.
44
" WHERE pool_id = %s ORDER BY booking_schedule_id ASC LIMIT 1"
,
45
[
"integer"
],
46
[$rec1[
"pool_id"
]]
47
);
48
if
($rec2 =
$db
->
fetchAssoc
($set2)) {
49
if
((
int
) $rec2[
"booking_schedule_id"
] !== 1) {
50
$db
->
update
(
51
"booking_object"
,
52
[
53
"schedule_id"
=> [
"intger"
, $rec2[
"booking_schedule_id"
]]
54
],
55
[
// where
56
"booking_object_id"
=> [
"integer"
, $rec1[
"booking_object_id"
]]
57
]
58
);
59
}
60
}
61
}
62
}
63
}
ILIAS\BookingManager\Setup\ilBookingManager8HotfixDBUpdateSteps
Definition:
class.ilBookingManager8HotfixDBUpdateSteps.php:24
ILIAS\BookingManager\Setup\ilBookingManager8HotfixDBUpdateSteps\$db
ilDBInterface $db
Definition:
class.ilBookingManager8HotfixDBUpdateSteps.php:25
ILIAS\BookingManager\Setup\ilBookingManager8HotfixDBUpdateSteps\step_1
step_1()
Definition:
class.ilBookingManager8HotfixDBUpdateSteps.php:32
ILIAS\BookingManager\Setup\ilBookingManager8HotfixDBUpdateSteps\prepare
prepare(\ilDBInterface $db)
Prepare the execution of the steps.
Definition:
class.ilBookingManager8HotfixDBUpdateSteps.php:27
ilDBInterface
Interface ilDBInterface.
Definition:
interface.ilDBInterface.php:30
ilDBInterface\update
update(string $table_name, array $values, array $where)
@description $where MUST contain existing columns only.
ilDBInterface\fetchAssoc
fetchAssoc(ilDBStatement $statement)
ilDBInterface\queryF
queryF(string $query, array $types, array $values)
ilDatabaseUpdateSteps
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
interface.ilDatabaseUpdateSteps.php:44
ILIAS\BookingManager\Setup
Definition:
AccessRBACOperationClonedObjective.php:21
components
ILIAS
BookingManager
classes
Setup
class.ilBookingManager8HotfixDBUpdateSteps.php
Generated on Sat Oct 18 2025 23:02:40 for ILIAS by
1.9.4 (using
Doxyfile
)