Go to the source code of this file.
◆ ilMDConvert()
ilMDConvert |
( |
|
$table, |
|
|
|
$fields, |
|
|
|
$key |
|
) |
| |
Definition at line 3 of file inc.meta_data_converter.php.
4{
6
7 $where = "WHERE ";
9 $where .= " LIKE '%\\%' ESCAPE '�'";
10
11 $query =
"SELECT * FROM " . $table .
" " .
12 $where;
13
17
18 $counter = 0;
19 foreach ($fields as $field) {
20 if ($counter++) {
22 } else {
24 }
25
26 $query .= ($field .
" = " .
$ilDB->quote(stripslashes($row->$field)) .
" ");
27 }
28 $query .= (
" WHERE " . $key .
" = " .
$ilDB->quote($row->$key));
29
30
32 }
33}
static quoteArray($a_array)
Quotes all members of an array for usage in DB query statement.
foreach($_POST as $key=> $value) $res
References $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, and ilUtil\quoteArray().