Salve, volevo sapere come fare un filtro che non ricordo più...
ho active=4 che vuol dire che il dato e nel cestino . ho active=2 vuol dire che e nascosto.
ho questo codice:
mi sembra che dovrei aggiungere un altra get e fare where active=4 per quelli che sono nel cestino e where active=2 per quelli che sono nascosti..
e cosi?
grazie mille e buone feste.
ho active=4 che vuol dire che il dato e nel cestino . ho active=2 vuol dire che e nascosto.
ho questo codice:
PHP:
$query = "SELECT utenti._user as _user , news_categorie.titolo as _cat , news.* FROM utenti
INNER JOIN news
ON utenti.id = news._userid INNER JOIN news_categorie
ON news_categorie.id = news._catid ";
if(!empty($_GET['cat'])) {
$query.="WHERE _catid=".(int)$_GET['cat'];
$cfg_current = $cfg_news_list_cat_admin;
}elseif(!empty($_GET['uid'])){
$query.="WHERE news._userid=".(int)$_GET['uid'];
$cfg_current = $cfg_news_list_utenti_admin;
}
$pag = new Paginazione($query,$cfg_current, $pagina);
mi sembra che dovrei aggiungere un altra get e fare where active=4 per quelli che sono nel cestino e where active=2 per quelli che sono nascosti..
e cosi?
grazie mille e buone feste.
Ultima modifica: