Count Male And Female Online
Started on the old forum in July 2008 · view the original in the archive · old links redirect here
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.
silly question its already there in the script.
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
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!!
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?
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ノ刀ノイリ!
i have ready see n try make ... can't .. how to combine ibwf_online n ibwf_users to see count male online yea?? :(
use
JOIN
mysql command
hpw rukiya ... can u paste that ? -hehe-
I pasted my codes here so many times,didnt I?
////////////////////////////////////////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? 🙁
how yea? :(
well I did not paste any code in this topic but I did tell you to use JOIN,to join 2 mysql tables , its easy
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];
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
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
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] ";
i was only trying to show what he talking
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!