Pour continuer ...
Par Jean-Michel Kervran, vendredi 17 novembre 2006 à 11:32 :: la poésie c'est... :: #13 :: rss ?> ::
La poésie c'est "une salve contre l'habitude" Henri PICHETTE, Les épiphanies, 1952
class dcExtendedInfo { function getInfo($type='postcount') { global $con; switch($type) { case 'postcount': $query = 'SELECT count(*) as info from '.DB_PREFIX.'post where post_pub=1'; break; case 'commentcount': $query = 'SELECT count(*) as info from '.DB_PREFIX.'comment where comment_pub=1 and comment_trackback=0'; break; case 'tbcount': $query = 'SELECT count(*) as info from '.DB_PREFIX.'comment where comment_pub=1 and comment_trackback=1'; break; case 'viewcount': $query = 'SELECT SUM(nb_view) FROM '.DB_PREFIX.'post'; break; } $res = $con->select($query); if ($type == 'viewcount') { return($res->arry_data[0]['sum(nb_view)']); } else { return($res->arry_data[0]['info']); } } } ?>
Aller au contenu | Aller au menu | Aller à la recherche
Par Jean-Michel Kervran, vendredi 17 novembre 2006 à 11:32 :: la poésie c'est... :: #13 :: rss ?> ::
La poésie c'est "une salve contre l'habitude" Henri PICHETTE, Les épiphanies, 1952
Aucun trackback.
Les trackbacks pour ce billet sont fermés.
Commentaires
1. Le vendredi 17 novembre 2006 à 11:32, par jean-michel kervran
Ajouter un commentaire
Les commentaires pour ce billet sont fermés.