ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
$
c
d
e
f
g
h
i
j
l
m
n
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
§
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
§
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Modules
Pages
inc.meta_data_converter.php
Go to the documentation of this file.
1
<?
php
2
3
function
ilMDConvert
(
$table
, $fields,
$key
)
4
{
5
global
$ilDB
;
6
7
$where =
"WHERE "
;
8
$where .= implode(
" LIKE '%\%' ESCAPE '�' OR "
,
ilUtil::quoteArray
($fields));
9
$where .=
" LIKE '%\\%' ESCAPE '�'"
;
10
11
$query
=
"SELECT * FROM "
.
$table
.
" "
.
12
$where;
13
14
$res
= $ilDB->query(
$query
);
15
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
16
$query
=
"UPDATE $table "
;
17
18
$counter = 0;
19
foreach
($fields as $field) {
20
if
($counter++) {
21
$query
.=
", "
;
22
}
else
{
23
$query
.=
"SET "
;
24
}
25
26
$query
.= ($field .
" = "
. $ilDB->quote(stripslashes(
$row
->$field)) .
" "
);
27
}
28
$query
.= (
" WHERE "
.
$key
.
" = "
. $ilDB->quote(
$row
->$key));
29
30
// Perform the query
31
$ilDB->query(
$query
);
32
}
33
}
ilMDConvert
ilMDConvert($table, $fields, $key)
Definition:
inc.meta_data_converter.php:3
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
$query
$query
Definition:
proxy_ylocal.php:13
$row
$row
Definition:
migrateto20.php:360
ilUtil\quoteArray
static quoteArray($a_array)
Quotes all members of an array for usage in DB query statement.
Definition:
class.ilUtil.php:4455
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
php
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
$table
if(empty($password)) $table
Definition:
pwgen.php:24
$key
$key
Definition:
croninfo.php:18
Services
Migration
DBUpdate_635
inc.meta_data_converter.php
Generated on Thu Apr 24 2025 19:02:10 for ILIAS by
1.8.13 (using
Doxyfile
)