function views_join::db_safe
Ensure that input is db safe. We only check strings and ints tho so something that needs floats in their joins needs to do their own type checking.
1 call to views_join::db_safe()
- views_join::join in includes/
handlers.inc - Build the SQL for the join this object represents.
File
-
includes/
handlers.inc, line 1719
Class
- views_join
- A function class to represent a join and create the SQL necessary to implement the join.
Code
function db_safe($input, $info) {
if (is_array($input)) {
$output = array();
foreach ($input as $value) {
if (empty($info['numeric'])) {
$output[] = db_escape_string($value);
}
else {
$output[] = intval($value);
}
}
}
else {
if (empty($info['numeric'])) {
$output = db_escape_string($input);
}
else {
$output = intval($input);
}
}
return $output;
}