Jump to content
InvisionCommunity.de - Der Deutsche Invision Community Support
Sign in to follow this  
Rüdiger

[request]zusätzliche Datenbankabfrage

Recommended Posts

Hallo,

bei meinem Forum gibt es die Möglichkeit auch einen PHP-Chat zu benutzen. Dazu gibt es einen Link im Board-Header. Nun möchte ich eine Abfrage einfügen, die die Anzahl der derzeitigen Chatuser ausgibt. Dazu habe ich eine ganz normale PHP Seite gebaut:

<?php require_once('****.php'); ?>

<?php

mysql_select_db($database_****, $****);

$query_Recordset1 = "SELECT online FROM **** where online = 1";

$Recordset1 = mysql_query($query_Recordset1, $****) or die(mysql_error());

$row_Recordset1 = mysql_fetch_assoc($Recordset1);

$totalRows_Recordset1 = mysql_num_rows($Recordset1);

?>


<html>

<head>

<title>Unbenanntes Dokument</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>


<body>

<?php echo $totalRows_Recordset1 ?> 

</body>

</html>

<?php

mysql_free_result($Recordset1);

?>

Das Ergebnis stimmt. Nun soll aber lediglich dieses Ergebniss innerhalb des Header neben dem Linkbutton angezeigt werden.

Wie mache ich so etwas?

Vielen Dank

Rüdiger

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×