Beiträge und Comments

Hallo Kerwin,

danke für deine Antwort. Aber wenn ich das so mache, dann kommt folgende Meldung:

Fatal error: Call to undefined function: mysq_query() in /var/www/html/web173/html/main/Claudia_aus_NRW/index.php on line 57

So habe ich das jetzt eingefügt. Hier mal der Code:

PHP:
<?php 
 //Konfigurations Datei einbinden
 include "../includes/config.php";
 ?>
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
 
 <script type="text/javascript">
   <!--
   function popup(additional_params) {
 	Fensterchen = window.open("popup.php?"+additional_params, "Zweitfenster", "width=500,height=500, menubar=no, toolbar=no, resizable=yes, scrollbars=yes");
 	Fensterchen.focus();
   }
   </script> 
 
 <title>Kinoberichte</title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <style type="text/css">
 <!--
 .Stil1 {
 	color: #FF0000;
 	font-weight: bold;
 	font-size: 24px;
 }
 -->
 </style>
 <link href="../img/layout/css/style.css" rel="stylesheet" type="text/css">
 </head>
 
 <body>
 <table width="50%"  border="0" align="center">
   <tr>
 	<td><div align="center" class="Stil1">Kinoberichte</div></td>
   </tr>
 </table>
 <p>&nbsp;					
 					<?php 
 					 $sql = "SELECT 
 					 id, 
 					 titel, 
 					 text 
 					 
 					 FROM 
 					 claudia
 					 "; 
 
 		    		$return = mysql_query($sql) OR die(mysql_error());	    			
 					?>
 				
 					<?php
 		    		while($_data = mysql_fetch_assoc($return))
 					{
 						?>
 <?
 $count= mysql_fetch_assoc(mysq_query('SELECT count(id) AS anzahl FROM Komments WHERE parent_id = "'.$data['id'].'"'));
 ?> 
 </p>
 <table width="50%"  border="0" align="center" class="intable">
   <tr>
 	<td height="15" bgcolor="#999999" class="extra"><strong></a><?php echo $_data[titel]; ?></strong></td>
   </tr>
   <tr>
 	<td height="26" bgcolor="#efefef"><p><?php echo $_data[text]; ?></p></td>
   </tr>
   <tr>
 	<td height="21"><div align="right">
 	  <p><a href="javascript:popup('parent_id=<?=$_data['id']?>')">>>> ab zu den Comments ( <?=$count['anzahl']?> ) </a> </p>
 	</div></td>
   </tr>
   <tr>
 	<td height="26"><p>&nbsp;</p></td>
   </tr>
 
 					<?php
 					}
 					?>
 					
 </table>
 <p>&nbsp;</p>
 <p align="center">[ <a href="eintragen.php">Bericht Eintragen</a> ] </p>
 </body>
 </html>

Gruß Claudia
 
Schau dir mal die Fehlermeldung genau an und sag mir mal die Funktion wo er rummeckert. mysq_query(), vielleicht sollte da mysqL_query() stehen.
 
Zurück