Jump to content

Query of rows in table / Echo it


Jezreel

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
Link to comment
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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.