Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
broj manje

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
unLog!c



Joined: 27 May 2004
Posts: 185
Location: Osijek

PostPosted: 17.06.2004 19:25    Post subject: broj manje Add user to your forum ignore list Reply with quote

Kako mogu u ovome kodu:
Code:

<?php
$host = "xxx";
$username = "xxx";
$password = "xxx";
$baza = "xxx";
$link=mysql_connect($host,$username,$password) or die("nemogu se spojiti na bazu");
mysql_select_db($baza);

$kveri_juzers=mysql_query("select user_id from phpbb_users", $link); 
$brojusera=mysql_num_rows($kveri_juzers);



?>


<html>
<head>
<title>AB.solute.ZERO-STUDIO</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">

</head>

<body>
<?php        echo "Na forumu ima $brojusera registriranih korisnika."; ?>
</body>
</html>


napraviti da mi prokazuje jedan broj manje???

_________________
Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
View user's profile Send private message MSN Messenger
silence



Joined: 24 Apr 2004
Posts: 890
Location: .....ni na nebu, ni na zemlji.....

PostPosted: 17.06.2004 19:40    Post subject: Add user to your forum ignore list Reply with quote

($brojusera -1 )? Very Happy

_________________
This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch").
Back to top
View user's profile Send private message Visit poster's website
maxy



Joined: 07 Sep 2003
Posts: 894
Location: Zagreb

PostPosted: 17.06.2004 19:44    Post subject: Add user to your forum ignore list Reply with quote

nije svemirska znanost fakat..

<?php
$host = "xxx";
$username = "xxx";
$password = "xxx";
$baza = "xxx";
$link=mysql_connect($host,$username,$password) or die("nemogu se spojiti na bazu");
mysql_select_db($baza);

$kveri_juzers=mysql_query("select user_id from phpbb_users", $link);
$brojusera=mysql_num_rows($kveri_juzers) - 1;


?>


<html>
<head>
<title>AB.solute.ZERO-STUDIO</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">

</head>

<body>
<?php echo "Na forumu ima $brojusera registriranih korisnika."; ?>
</body>
</html>
Back to top
View user's profile Send private message
unLog!c



Joined: 27 May 2004
Posts: 185
Location: Osijek

PostPosted: 17.06.2004 19:47    Post subject: Add user to your forum ignore list Reply with quote

evo ga,
hvala...

_________________
Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
View user's profile Send private message MSN Messenger
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 17.06.2004 22:39    Post subject: Add user to your forum ignore list Reply with quote

Samo mala napomena:

Ovaj gornji query na bazu ti nece vracati tocan broj registriranih korisnika, ako zbog nicega onda zbog toga jer uzima i defaultnog anonymous usera, pa ti treba taj -1 koji trazis Smile

Zato radje uzmi ovaj query:
Code:
SELECT COUNT(user_id) AS total FROM phpbb_users WHERE user_id <> -1;

-1 je konstanta koja trenutno oznacava ANONYMOUS status usera u phpbb-u, ali ako ti je do portabilnosti i kasnijeg lakseg upgrade-a phpbb-a, napravi to tako da u tom fileu prije nego radis query za usercount includeas() phpbb-ove config.php i includes/constants.php i onda napravis upit ovako:
Code:
$sql = "SELECT COUNT(user_id) AS total FROM " . USERS_TABLE . " WHERE user_id <> " . ANONYMOUS;


Tako je napravljeno i u samom phpbb kodu, dakle ne mozes pogrijesiti Smile

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group