method fusion documentation in bbn\Entities\Address
function($ids)
{
if ( count($args) > 1 ){
$id = array_shift($args);
$creation = [$this->db->selectOne('bbn_history', 'tst', [
'uid' => $id,
'opr' => 'INSERT'
])];
foreach ( $args as $a ){
if ( $fn = $this->get_info($a) ){
$creation[] = $this->db->selectOne('bbn_history', 'tst', [
'uid' => $a
]);
$cols = $this->db->getFieldsList('apst_liens');
$cols['creation'] = 'tst';
$links = $this->db->rselectAll([
'tables' => ['apst_liens'],
'fields' => $cols,
'join' => [
[
'table' => 'bbn_history',
'on' => [
'conditions' => [
[
'field' => 'bbn_history.uid',
'operator' => 'eq',
'exp' => 'apst_liens.id'
]
],
'logic' => 'AND'
]
]
],
'where' => [
'id_lieu' => $a
]
]);
foreach ( $links as $link ){
$this->db->update('apst_liens', ['id_lieu' => $id], ['id' => $link['id']]);
}
$this->db->query("
UPDATE bbn_history
SET uid = ?
WHERE uid = ?
AND opr LIKE 'UPDATE'",
hex2bin($id),
hex2bin($a)
);
$this->db->query("
DELETE FROM bbn_history
WHERE uid = ?",
hex2bin($a)
);
$this->db->query("
DELETE FROM bbn_addresses
WHERE id = ?",
hex2bin($a)
);
}
}
$this->db->query("
UPDATE bbn_history
SET tst = ?
WHERE uid = ?
AND opr LIKE 'INSERT'",
min($creation),
hex2bin($id)
);
}
return 1;
}
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