Ajout d'une fonction pour trouver la blockchaine d'un couple : objet /
id_objet
This commit is contained in:
parent
f9b6ad0d25
commit
0b709d39cd
1 changed files with 15 additions and 0 deletions
|
@ -12,3 +12,18 @@
|
||||||
if (!defined('_ECRIRE_INC_VERSION')) {
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function trouver_blocklog($id_objet, $objet){
|
||||||
|
$from = array(
|
||||||
|
'spip_blocklogs as B',
|
||||||
|
'spip_blocklogs_liens as L'
|
||||||
|
);
|
||||||
|
$where = array(
|
||||||
|
'L.id_objet='.intval($id_objet),
|
||||||
|
'L.objet='.sql_quote($objet),
|
||||||
|
'L.id_blocklog=B.id_blocklog'
|
||||||
|
);
|
||||||
|
$blockchaine = sql_getfetsel('blockchaine', $from, $where, '', 'B.id_blocklog DESC', 1);
|
||||||
|
|
||||||
|
return $blockchaine;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue