Jump to content

Archived

This topic is now archived and is closed to further replies.

Jezreel

Query of rows in table / Echo it

Recommended Posts

Hi,

I need help with a snipet of code that will query the MySql database for the amount of rows that are in a table called "flashchat_connections" and then echo the amount of rows next to the text "Chat" as listed below.

[code]</font> <a href="<?=$main_url?>/chat.php?mode=flashchat" target="_blank" class="mainlink bold"><font color="#FFFFFF">Chat</font></a> <font color="#FFFFFF">|[/code]

This link "Chat" is in the header of my site and the idea is to have the amount of users that are currently in the chat room to be displayed next to it so they know how many people if any are currently in the chat room before they even enter it. The amount of rows in "flashchat_connections" is = to the amount of users currently in the chat room.

I am also a newbie to this forum so I thank you ahead of time for mercy if I did not follow appropriate procedures in this message.

Thanks,

Jezreel

Share this post


Link to post
Share on other sites
[!--coloro:#FF6666--][span style=\"color:#FF6666\"][!--/coloro--]Found it here: [a href=\"http://www.php.net/mysql_num_rows\" target=\"_blank\"]http://www.php.net/mysql_num_rows[/a][!--colorc--][/span][!--/colorc--]

No Need to Reply

[!--quoteo(post=370600:date=May 2 2006, 12:08 PM:name=Jezreel)--][div class=\'quotetop\']QUOTE(Jezreel @ May 2 2006, 12:08 PM) [snapback]370600[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hi,

I need help with a snipet of code that will query the MySql database for the amount of rows that are in a table called "flashchat_connections" and then echo the amount of rows next to the text "Chat" as listed below.

[code]</font> <a href="<?=$main_url?>/chat.php?mode=flashchat" target="_blank" class="mainlink bold"><font color="#FFFFFF">Chat</font></a> <font color="#FFFFFF">|[/code]

This link "Chat" is in the header of my site and the idea is to have the amount of users that are currently in the chat room to be displayed next to it so they know how many people if any are currently in the chat room before they even enter it. The amount of rows in "flashchat_connections" is = to the amount of users currently in the chat room.

I am also a newbie to this forum so I thank you ahead of time for mercy if I did not follow appropriate procedures in this message.

Thanks,

Jezreel
[/quote]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.