mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Revert "datalib: Introducing sql_intarray_to_in()"
We don't need sql_intarray_to_in(), use implode() instead. This reverts commit 3ef7fc54d9df780c837c64a8ace1fc565d6d7744.
This commit is contained in:
parent
41709a387f
commit
2e159efb1c
1 changed files with 0 additions and 16 deletions
|
@ -2170,21 +2170,5 @@ function get_creatable_categories() {
|
||||||
return $creatablecats;
|
return $creatablecats;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Turn an array of ints into a string usable in an IN sql clause...
|
|
||||||
*
|
|
||||||
**/
|
|
||||||
function sql_intarray_to_in($array) {
|
|
||||||
|
|
||||||
$na = array();
|
|
||||||
$c = count($array);
|
|
||||||
for ($n=0;$n<$c;$n++) {
|
|
||||||
if (isset($array[$n]) && is_int($array[$n])) {
|
|
||||||
$na[] = $array[$n];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return join(',',$array);
|
|
||||||
}
|
|
||||||
|
|
||||||
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
|
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue