Count Male And Female Online

Started on the old forum in July 2008 · view the original in the archive · old links redirect here

35 replies · 2,198 views · started 18 years ago · 1 min read

TL;DR · summary of 35 replies
  • - The issue was about counting Male and Female users online in an ONLINE MENU.
  • - The code approach involved using JOIN to combine ibwf_online and ibwf_users tables for accurate counts of male and female users.
  • - A solution was provided by Guest, suggesting a modification to the index.php file for better handling of page jumpers.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

6 participants
winpda Junior · 38 posts #1

Who can help this coding to make Count Male and Female online in ONLINE MENU ? How ? 😀

tkrocks Junior · 39 posts #3

Who can help this coding to make Count Male and Female online in ONLINE MENU ? How ? :D

for wat script ?

I WAS BORNED INTELLIGENT BUT EDUCATION RUINED ME...!!!

learner Lead · 587 posts #4

something like this i think what he want

$randomm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE sex='M' ORDER BY RAND() LIMIT 1"));

echo "Males Online :  $random[0]
";

$randomm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE sex='F' ORDER BY RAND() LIMIT 1"));

echo "Females Online : $random[0]
";

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

winpda Junior · 38 posts #5

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/../public_html/wml/online.php on line 134

winpda Junior · 38 posts #6

ibwf_online have sex ? .think.

winpda Junior · 38 posts #7

if($action=="main") {

addonline(getuid_sid($sid),"Online List",""); echo "<card id="main" title="ONLINE">";

echo "

"; echo "".date("D d M y - h:i:s")." "; echo "ONLINE MENU"; echo " ";

echo "

"; echo "<a href="online.php?action=online&sid=$sid">All's Online: (".getnumonline().")</a> "; $timeout = 180; $timeon = time()-$timeout; $noi = mysql_fetch_array(mysql_query("SELECT COUNT() FROM ibwf_users WHERE sex>'M' AND lastact>'".$timeon."'")); echo "<a href="online.php?action=mol&sid=$sid">Male's Online: (".$noi[0].")</a> "; $timeout = 180; $timeon = time()-$timeout; $noi = mysql_fetch_array(mysql_query("SELECT COUNT() FROM ibwf_users WHERE sex>'F' AND lastact>'".$timeon."'")); echo "<a href="online.php?action=fol&sid=$sid">Female's Online: (".$noi[0].")</a> "; echo " ";

echo "

"; $tmsg = getpmcount(getuid_sid($sid)); $umsg = getunreadpm(getuid_sid($sid)); if($umsg>0) { echo "<a href="inbox.php?action=urd&sid=$sid">($umsg) Unread PM</a> "; } echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>"; echo "Home</a>"; echo " "; echo "</card>"; }

this coding can't work to view count male n female online ... who can help this problem?

metulj Super moderator Principal · 1,726 posts #8

take a look into index.php under

else if($action=="stats")

there you can get idea how to code what you need...

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

winpda Junior · 38 posts #9

i have ready see n try make ... can't .. how to combine ibwf_online n ibwf_users to see count male online yea?? 🙁

winpda Junior · 38 posts #11

hpw rukiya ... can u paste that ? -hehe-

winpda Junior · 38 posts #13

////////////////////////////////////////ONLINE USER if($action=="main") {

addonline(getuid_sid($sid),"Online List",""); echo "<card id="main" title="ONLINE">";

echo "

"; echo "".date("D d M y - h:i:s")." "; echo "ONLINE MENU"; echo " ";

echo "

"; echo "<a href="online.php?action=online&sid=$sid">All's Online: (".getnumonline().")</a> "; $timeout = 180; $timeon = time()-$timeout; $noi = mysql_fetch_array(mysql_query("SELECT COUNT() FROM ibwf_users WHERE sex>'M' AND lastact>'".$timeon."'")); echo "<a href="online.php?action=mol&sid=$sid">Male's Online: (".$noi[0].")</a>(Under Construction) "; $timeout = 180; $timeon = time()-$timeout; $noi = mysql_fetch_array(mysql_query("SELECT COUNT() FROM ibwf_users WHERE sex>'F' AND lastact>'".$timeon."'")); echo "<a href="online.php?action=fol&sid=$sid">Female's Online: (".$noi[0].")</a>(Under Construction) "; echo " ";

echo "

"; $tmsg = getpmcount(getuid_sid($sid)); $umsg = getunreadpm(getuid_sid($sid)); if($umsg>0) { echo "<a href="inbox.php?action=urd&sid=$sid">($umsg) Unread PM</a> "; } echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>"; echo "Home</a>"; echo " "; echo "</card>"; }

how yea? 🙁

winpda Junior · 38 posts #15

im so noob ... hehe ... how to combine that coding ... ? i dont know ... huhu

rukiya Lead · 569 posts #16

im so noob ... hehe ... how to combine that coding ... ? i dont know ... huhu

well at least you admitted that you are noob but some smart ass noob here dnt admit it

any way here is the EASY thing that you have been trying for 1 week

$rukiya=mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT a.userid) FROM ibwf_online a JOIN ibwf_users b ON a.userid = b.id  WHERE b.sex='M'"));
echo $rukiya[0];
$rukiya=mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT a.userid) FROM ibwf_online a JOIN ibwf_users b ON a.userid = b.id  WHERE b.sex='F'"));
echo $rukiya[0];
BoYzONe Developer · 88 posts #17

nice topic..i know he means :

all online (20) female online (10) male online (10)

i also need that script.

rukiya Lead · 569 posts #19

<{POST_SNAPBACK}>

well at least you admitted that you are noob but some smart ass noob here dnt admit it

i never said i am a expart rukiya bru

that msg is not for you, I do know what you are but why were trying to be smart by posting absurd thing like this

silly question its already there in the script.

and posted a wrong code like this and proved yourself silly?

something like this i think what he want

$randomm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE sex='M' ORDER BY RAND() LIMIT 1"));

echo "Males Online :  $random[0]
";
$randomm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE sex='F' ORDER BY RAND() LIMIT 1"));

echo "Females Online : $random[0]
";

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close