コード例 #1
0
ファイル: fun.sql.php プロジェクト: jpgil/tematres-mirror
function SQLarbolTema($tema_id)
{
    global $DBCFG;
    $tema_id = secure_data($tema_id, "sql");
    $ARRAYtema_indice = ARRAYIndexTema($tema_id);
    if ($ARRAYtema_indice) {
        $temas_ids = str_replace('|', ',', $ARRAYtema_indice[indice]);
        $temas_ids = substr($temas_ids, 1);
        $sql = SQL("select", "t.tema_id as tema_id,t.tema\r\n\t\tfrom {$DBCFG['DBprefix']}tema t\r\n\t\twhere t.tema_id in ({$temas_ids})\r\n\t\torder by FIELD(t.tema_id, {$temas_ids})");
        return $sql;
    }
}
コード例 #2
0
function ARRAYmyTopTerm($term_id, $index = "1")
{
    $myIndex = ARRAYIndexTema($term_id);
    $arrayMyIndex = explode('|', $myIndex["indice"]);
    $arrayTerm = ARRAYverTerminoBasico($arrayMyIndex[$index]);
    return $arrayTerm;
}