Jump to content


Photo

Query of rows in table / Echo it


  • Please log in to reply
1 reply to this topic

#1 Jezreel

Jezreel
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 02 May 2006 - 04:08 PM

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.

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

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

#2 Jezreel

Jezreel
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 02 May 2006 - 04:29 PM

[!--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) View Post[/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.

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

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]





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users