entries friends calendar user info red Previous Previous Next Next
where i lay my head is home - Post a comment
thp, man tev mazs jautājums par php.
tip, man ir php kods, kurs no mana foruma datubazes user tabulas atgriez member count vertibu (t.i., izskaita cik datubaze ir useru un atgriez to vertibu). Tada veida man pirmaja lapa ir redzams, cik man memberu foruma ir. Problema ir taja, ka taja users tabula ir ari viens anonimais users, kuru nedrikst izdzest. tas id tiek iedots visiem anonimajiem. problema tada, ka man tas kods atgriez visus registretos userus plus to anonimo, tada veida man vienmer rada registreto member skaitu+1 (tas anonimais)

te ir kods ->

----------------
if($forumname == 'phpBB2')
{
if($settings[0]) // Display member count?
{
$countusers = $DB->query_first("SELECT COUNT(*) AS users FROM " . $tableprefix . "users");
echo 'Foruma dalibnieki: ' . $countusers['users'] . '';
}

------------------

vari ludzu pateikt, ka tam ir jaizskatas, lai vins atgrieztu visu user tabulas useru skaitu un atnemtu 1 tipa-> countusers -1

drosivien tas ir abstulbinosi vienkarsi, bet ta ka es php praktiski nezinu... :)

busu pateicigs par palidzibu! :)

p.s. tas kods augsa nav manis rakstits

Reply

From:
(will be screened if not a friend)
Username:
Password:
(will be screened)
Ievadi te 'qws' (liidzeklis pret spambotiem):
Subject:
No HTML allowed in subject
  
Message:

Notice! This user has turned on the option that logs your IP address when posting.
profile
noguris, taču laimīgs
Name: noguris, taču laimīgs
Website: red
calendar
Back April 2007
1234567
891011121314
15161718192021
22232425262728
2930