method replaceTableInConditions documentation in bbn\Db
function(array $conditions, $old_name, $new_name)
{
return X::map(
function ($a) use ($old_name, $new_name) {
if (!empty($a['field'])) {
$a['field'] = preg_replace("/(\\W|^)$old_name([\\`\\']*\\s*)\\./", '$1'.$new_name.'$2.', $a['field']);
}
if (!empty($a['exp'])) {
$a['exp'] = preg_replace("/(\\W|^)$old_name([\\`\\']*\\s*)\\./", '$1'.$new_name.'$2.', $a['exp']);
}
return $a;
}, $conditions, 'conditions'
);
}
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions