Jump to content

Showing goalscorers next to the fixture


bravo14

Recommended Posts

Hi guys

 

I shall try and explain this clearly...

 

I have one table in a database that shows the fixtures, and I have a table showing all of the goalscorers for each fixture linked by a field called fixture_id.  What i want to achieve is next to the result show the goalscorers for that game, below is the entire code for the page

 

When I display the page I get all of the fixtures displayed but no goalscorers, now we may not be the best team in the world but we have scored this season :)

 

I did seek some help from a friend, which resulted in this page...

 

<?php require_once('includes/connect.php'); ?>
<?php if (!function_exists("GetSQLValueString")) 
{ function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{  if (PHP_VERSION < 6) 
{    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;  }  
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);  
switch ($theType) 
{    
case "text":      
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      
break;        
case "long":    
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";      
break;    
case "double":      
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";      
break;    
case "date":      
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      
break;    
case "defined":      
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;      
break;  }  return $theValue; } } $maxRows_rsFixtures = 20; 
$pageNum_rsFixtures = 0; 
if (isset($_GET['pageNum_rsFixtures'])) {  $pageNum_rsFixtures = $_GET['pageNum_rsFixtures']; 
} 
$startRow_rsFixtures = $pageNum_rsFixtures * $maxRows_rsFixtures; ; 
$query_rsFixtures = "SELECT * FROM tbl_fixtures WHERE tbl_fixtures.team_id = 1"; 
$query_limit_rsFixtures = sprintf("%s LIMIT %d, %d", $query_rsFixtures, $startRow_rsFixtures, $maxRows_rsFixtures); 
$rsFixtures = mysql_query($query_limit_rsFixtures) or die(mysql_error()); 
$row_rsFixtures = mysql_fetch_assoc($rsFixtures); 
if (isset($_GET['totalRows_rsFixtures'])) {  $totalRows_rsFixtures = $_GET['totalRows_rsFixtures']; 
} 
else 
{  
$all_rsFixtures = mysql_query($query_rsFixtures);  
$totalRows_rsFixtures = mysql_num_rows($all_rsFixtures); 
} 
$totalPages_rsFixtures = ceil($totalRows_rsFixtures/$maxRows_rsFixtures)-1; 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>• Yardley Hockey Club •</title>

<meta name="keywords" content="yardley, hockey, league, mrha, small heath, co-op" />
<meta name="description" content="The Official Website of Yardley Hockey Club" />
<link href="style/2008.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" >
</head>

<body bgcolor="#FFFFCC">
  <div align="center"> <div id="maincontent">
    <div id="header"><img src="images/logo.png" /></div>
<div id="scrolltext">
<marquee>
<?php include('includes/marquee.php'); ?>
</marquee>
</div>
<div id="topnav">
<a href="index.php"><img src="images/menu/home.png" border="0" /></a>
<a href="club.php"><img src="images/menu/club.png" border="0" /></a>
<a href="main.php?team_id=1"><img src="images/menu/1st_XI.png" border="0" /></a>
<a href="main.php?team_id=2"><img src="images/menu/fathoms.png" border="0" /></a>
<a href="main.php?team_id=3"><img src="images/menu/badgers.png" border="0" /></a>
<a href="main.php?team_id=4"><img src="images/menu/u11.png" border="0" /></a>
<a href="news.php"><img src="images/menu/news.png" border="0" /></a>
<a href="forum/index.php"><img src="images/menu/forum.png" border="0" /></a>
<a href="links.php"><img src="images/menu/links.png" border="0" /></a>
</div>
<div id="submenu">
<?php
$team = ('SELECT * FROM `tbl_team_menu` where `page` <>"main.php" and  `team_id`=\'' . $_GET['team_id'] . '\'');
$teamresult=mysql_query($team);
while($teamrow = mysql_fetch_array($teamresult)) 
{
      echo('<a href="'.$teamrow['page'].'?team_id='.$teamrow['team_id'].'"><img src="images/menu/'.$teamrow['button'].'" border="0"></a>');
}
?>
</div>
<div id="maintext">
<div id="fixtures"><?php include('includes/next_fixtures.php'); ?>
</div>
<div align="left">
<table width =75%>
<b><tr><td>Date</td><td>Home</td><td width="20">Score</td><td>Away</td><td>Result</td><td>Scorers</td><td>Match Report</td></tr></b>
<?php

$result = mysql_query('SELECT * FROM `tbl_fixture_dates` INNER JOIN `tbl_fixtures` ON `tbl_fixture_dates`.`date_id` = `tbl_fixtures`.`date_id` WHERE `tbl_fixtures`.`team_id` =  \'' . $_GET['team_id'] . '\' order by match_date') or die(mysql_error());
if(mysql_num_rows($result) < 1) 
{ 
   echo('<tr><td colspan="6">Sorry, no results were found.</td></tr>'); 
} 
else 
{ 
   while($row = mysql_fetch_array($result))
    {
if ($row[HomeAway]=="Home") {
echo "<tr><td>".date("d-M-Y", strtotime($row['match_date']))."</td><td><b>Yardley</b></td>";
echo ('<td align="center">'.$row[yardley_goals].'-'.$row[opposition_goals].'</td><td>'.$row[Opposition].'</td>');
echo ('<td>'.$row[Result].'</td><td>');
if($row_rsFixtures['yardley_goals']>0)
{        
$match_id = $row_rsFixtures['match_id'];        
echo "Goal Scorers - ";                    
$maxRows_rsScorers = 10;            
$pageNum_rsScorers = 0;        
if (isset($_GET['pageNum_rsScorers'])) 
{          
$pageNum_rsScorers = $_GET['pageNum_rsScorers'];        
}        
$startRow_rsScorers = $pageNum_rsScorers * $maxRows_rsScorers;                
$query_rsScorers = "SELECT tbl_scorers.scorer, tbl_scorers.goals, tbl_scorers.match_id, tbl_fixtures.match_id  FROM tbl_fixtures, tbl_scorers WHERE tbl_fixtures.match_id = $match_id AND tbl_scorers.match_id = $match_id";        
$query_limit_rsScorers = sprintf("%s LIMIT %d, %d", $query_rsScorers, $startRow_rsScorers, $maxRows_rsScorers);        
$rsScorers = mysql_query($query_limit_rsScorers) or die(mysql_error());        
$row_rsScorers = mysql_fetch_assoc($rsScorers);        
if (isset($_GET['totalRows_rsScorers'])) 
{          
$totalRows_rsScorers = $_GET['totalRows_rsScorers'];        
} 
else 
{          
$all_rsScorers = mysql_query($query_rsScorers);          
$totalRows_rsScorers = mysql_num_rows($all_rsScorers);        
}        
$totalPages_rsScorers = ceil($totalRows_rsScorers/$maxRows_rsScorers)-1;                
do 
{            
echo $row_rsScorers['scorer'] ."(";            
echo $row_rsScorers['goals'];            
echo ")<br/>";        
}
while ($row_rsScorers = mysql_fetch_assoc($rsScorers));        
}        
echo "<br/>";    
} 
while ($row_rsFixtures = mysql_fetch_assoc($rsFixtures));
{
echo('</td><td><a href="report.php?match_id='.$row[match_id].'">View Report</a></td></tr>');
    echo "<tr><td>".date("d-M-Y", strtotime($row['match_date']))."</td><td>".$row[Opposition]."</td>";
echo ('<td align="center">'.$row[opposition_goals].'-'.$row[yardley_goals].'</td><td><b>Yardley</b></td>');
echo ('<td>'.$row[Result].'</td><td>');
if($row_rsFixtures['yardley_goals']>0)
{        
$match_id = $row_rsFixtures['match_id'];        
echo "Goal Scorers - ";                    
$maxRows_rsScorers = 10;            
$pageNum_rsScorers = 0;        
if (isset($_GET['pageNum_rsScorers'])) 
{          
$pageNum_rsScorers = $_GET['pageNum_rsScorers'];        
}        
$startRow_rsScorers = $pageNum_rsScorers * $maxRows_rsScorers;                
$query_rsScorers = "SELECT tbl_scorers.scorer, tbl_scorers.goals, tbl_scorers.match_id, tbl_fixtures.match_id  FROM tbl_fixtures, tbl_scorers WHERE tbl_fixtures.match_id = $match_id AND tbl_scorers.match_id = $match_id";        
$query_limit_rsScorers = sprintf("%s LIMIT %d, %d", $query_rsScorers, $startRow_rsScorers, $maxRows_rsScorers);        
$rsScorers = mysql_query($query_limit_rsScorers) or die(mysql_error());        
$row_rsScorers = mysql_fetch_assoc($rsScorers);        
if (isset($_GET['totalRows_rsScorers'])) 
{          
$totalRows_rsScorers = $_GET['totalRows_rsScorers'];        
} 
else 
{          
$all_rsScorers = mysql_query($query_rsScorers);          
$totalRows_rsScorers = mysql_num_rows($all_rsScorers);        
}        
$totalPages_rsScorers = ceil($totalRows_rsScorers/$maxRows_rsScorers)-1;                
do 
{            
echo $row_rsScorers['scorer'] ."(";            
echo $row_rsScorers['goals'];            
echo ")<br/>";        
}
while ($row_rsScorers = mysql_fetch_assoc($rsScorers));        
}        
echo "<br/>";    
} 
while ($row_rsFixtures = mysql_fetch_assoc($rsFixtures));	
echo('</td><td><a href="report.php?match_id='.$row[match_id].'">View Report<a></td></tr>');
        }
}

mysql_close($con);
?>
</table>
</div>
</div>
<div>
</div>
</div>
</body>
</html>
<?php 
mysql_free_result($rsFixtures); 
mysql_free_result($rsScorers); 
?>

 

Any ideas, please

Link to comment
https://forums.phpfreaks.com/topic/151492-showing-goalscorers-next-to-the-fixture/
Share on other sites

This is the sample code that I got back from a friend and this works

<?php require_once('Connections/conn_mysql.php'); ?> 
<?php if (!function_exists("GetSQLValueString")) 
{ function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{  if (PHP_VERSION < 6) {    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;  
}  
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);  switch ($theType) {    case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;        
case "long":    
case "int":      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";      
break;    
case "double":      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";      
break;    
case "date":      
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      
break;    
case "defined":      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;      
break;  
}  
return $theValue; 
} 
} 
$maxRows_rsFixtures = 20; 
$pageNum_rsFixtures = 0; 
if (isset($_GET['pageNum_rsFixtures'])) 
{  
$pageNum_rsFixtures = $_GET['pageNum_rsFixtures']; 
} 
$startRow_rsFixtures = $pageNum_rsFixtures * $maxRows_rsFixtures; mysql_select_db($database_conn_mysql, $conn_mysql); 
$query_rsFixtures = "SELECT * FROM tbl_fixtures WHERE tbl_fixtures.team_id = 1"; 
$query_limit_rsFixtures = sprintf("%s LIMIT %d, %d", $query_rsFixtures, $startRow_rsFixtures, $maxRows_rsFixtures); 
$rsFixtures = mysql_query($query_limit_rsFixtures, $conn_mysql) or die(mysql_error()); 
$row_rsFixtures = mysql_fetch_assoc($rsFixtures); 
if (isset($_GET['totalRows_rsFixtures'])) {  $totalRows_rsFixtures = $_GET['totalRows_rsFixtures']; 
} 
else 
{  
$all_rsFixtures = mysql_query($query_rsFixtures);  
$totalRows_rsFixtures = mysql_num_rows($all_rsFixtures); 
} 
$totalPages_rsFixtures = ceil($totalRows_rsFixtures/$maxRows_rsFixtures)-1; 
?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<title>Untitled Document</title> 
</head> 
<body> 
<h1>Fixtures</h1>  
<?php 
do 
{     
echo $row_rsFixtures['Opposition'];     
echo "(";     
echo $row_rsFixtures['yardley_goals'];     
echo ":";     
echo $row_rsFixtures['opposition_goals'];     
echo ")";     
echo "<br/>";        
if($row_rsFixtures['yardley_goals']>0)
{        
$match_id = $row_rsFixtures['match_id'];        
echo "Goal Scorers - ";                    
$maxRows_rsScorers = 10;            
$pageNum_rsScorers = 0;        
if (isset($_GET['pageNum_rsScorers'])) 
{          
$pageNum_rsScorers = $_GET['pageNum_rsScorers'];        
}        
$startRow_rsScorers = $pageNum_rsScorers * $maxRows_rsScorers;        
mysql_select_db($database_conn_mysql, $conn_mysql);        
$query_rsScorers = "SELECT tbl_scorers.scorer, tbl_scorers.goals, tbl_scorers.match_id, tbl_fixtures.match_id  FROM tbl_fixtures, tbl_scorers WHERE tbl_fixtures.match_id = $match_id AND tbl_scorers.match_id = $match_id";        
$query_limit_rsScorers = sprintf("%s LIMIT %d, %d", $query_rsScorers, $startRow_rsScorers, $maxRows_rsScorers);        
$rsScorers = mysql_query($query_limit_rsScorers, $conn_mysql) or die(mysql_error());        
$row_rsScorers = mysql_fetch_assoc($rsScorers);        
if (isset($_GET['totalRows_rsScorers'])) 
{          
$totalRows_rsScorers = $_GET['totalRows_rsScorers'];        
} 
else 
{          
$all_rsScorers = mysql_query($query_rsScorers);          
$totalRows_rsScorers = mysql_num_rows($all_rsScorers);        
}        
$totalPages_rsScorers = ceil($totalRows_rsScorers/$maxRows_rsScorers)-1;                
do 
{            
echo $row_rsScorers['scorer'] ."(";            
echo $row_rsScorers['goals'];            
echo ")<br/>";        
}
while 
($row_rsScorers = mysql_fetch_assoc($rsScorers));        
}        
echo "<br/>";    
} 
while 
($row_rsFixtures = mysql_fetch_assoc($rsFixtures)); ?>   
</body> 
</html> 
<?php mysql_free_result($rsFixtures); mysql_free_result($rsScorers); ?>


 

however when I copy this code into the page layout I want the goalscorers do not display, the code for that is

<?php require_once('includes/connect.php'); ?>
<?php if (!function_exists("GetSQLValueString")) 
{ function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{  if (PHP_VERSION < 6) 
{    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;  }  
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);  
switch ($theType) 
{    
case "text":      
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      
break;        
case "long":    
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";      
break;    
case "double":      
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";      
break;    
case "date":      
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      
break;    
case "defined":      
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;      
break;  }  return $theValue; } } $maxRows_rsFixtures = 20; 
$pageNum_rsFixtures = 0; 
if (isset($_GET['pageNum_rsFixtures'])) {  $pageNum_rsFixtures = $_GET['pageNum_rsFixtures']; 
} 
$startRow_rsFixtures = $pageNum_rsFixtures * $maxRows_rsFixtures; ; 
$query_rsFixtures = "SELECT * FROM tbl_fixtures WHERE tbl_fixtures.team_id = 1"; 
$query_limit_rsFixtures = sprintf("%s LIMIT %d, %d", $query_rsFixtures, $startRow_rsFixtures, $maxRows_rsFixtures); 
$rsFixtures = mysql_query($query_limit_rsFixtures) or die(mysql_error()); 
$row_rsFixtures = mysql_fetch_assoc($rsFixtures); 
if (isset($_GET['totalRows_rsFixtures'])) {  $totalRows_rsFixtures = $_GET['totalRows_rsFixtures']; 
} 
else 
{  
$all_rsFixtures = mysql_query($query_rsFixtures);  
$totalRows_rsFixtures = mysql_num_rows($all_rsFixtures); 
} 
$totalPages_rsFixtures = ceil($totalRows_rsFixtures/$maxRows_rsFixtures)-1; 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>• Yardley Hockey Club •</title>

<meta name="keywords" content="yardley, hockey, league, mrha, small heath, co-op" />
<meta name="description" content="The Official Website of Yardley Hockey Club" />
<link href="style/2008.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" >
</head>

<body bgcolor="#FFFFCC">
  <div align="center"> <div id="maincontent">
    <div id="header"><img src="images/logo.png" /></div>
<div id="scrolltext">
<marquee>
<?php include('includes/marquee.php'); ?>
</marquee>
</div>
<div id="topnav">
<a href="index.php"><img src="images/menu/home.png" border="0" /></a>
<a href="club.php"><img src="images/menu/club.png" border="0" /></a>
<a href="main.php?team_id=1"><img src="images/menu/1st_XI.png" border="0" /></a>
<a href="main.php?team_id=2"><img src="images/menu/fathoms.png" border="0" /></a>
<a href="main.php?team_id=3"><img src="images/menu/badgers.png" border="0" /></a>
<a href="main.php?team_id=4"><img src="images/menu/u11.png" border="0" /></a>
<a href="news.php"><img src="images/menu/news.png" border="0" /></a>
<a href="forum/index.php"><img src="images/menu/forum.png" border="0" /></a>
<a href="links.php"><img src="images/menu/links.png" border="0" /></a>
</div>
<div id="submenu">
<?php
$team = ('SELECT * FROM `tbl_team_menu` where `page` <>"main.php" and  `team_id`=\'' . $_GET['team_id'] . '\'');
$teamresult=mysql_query($team);
while($teamrow = mysql_fetch_array($teamresult)) 
{
      echo('<a href="'.$teamrow['page'].'?team_id='.$teamrow['team_id'].'"><img src="images/menu/'.$teamrow['button'].'" border="0"></a>');
}
?>
</div>
<div id="maintext">
<div id="fixtures"><?php include('includes/next_fixtures.php'); ?>
</div>
<div align="left">
<table width =75%>
<b><tr><td>Date</td><td>Home</td><td width="20">Score</td><td>Away</td><td>Result</td><td>Scorers</td><td>Match Report</td></tr></b>
<?php

$result = mysql_query('SELECT * FROM `tbl_fixture_dates` INNER JOIN `tbl_fixtures` ON `tbl_fixture_dates`.`date_id` = `tbl_fixtures`.`date_id` WHERE `tbl_fixtures`.`team_id` =  \'' . $_GET['team_id'] . '\' order by match_date') or die(mysql_error());
if(mysql_num_rows($result) < 1) 
{ 
   echo('<tr><td colspan="6">Sorry, no results were found.</td></tr>'); 
} 
else 
{ 
   while($row = mysql_fetch_array($result))
    {
if ($row[HomeAway]=="Home") {
echo "<tr><td>".date("d-M-Y", strtotime($row['match_date']))."</td><td><b>Yardley</b></td>";
echo ('<td align="center">'.$row[yardley_goals].'-'.$row[opposition_goals].'</td><td>'.$row[Opposition].'</td>');
echo ('<td>'.$row[Result].'</td><td>');
if($row_rsFixtures['yardley_goals']>0)
{        
$match_id = $row_rsFixtures['match_id'];        
echo "Goal Scorers - ";                    
$maxRows_rsScorers = 10;            
$pageNum_rsScorers = 0;        
if (isset($_GET['pageNum_rsScorers'])) 
{          
$pageNum_rsScorers = $_GET['pageNum_rsScorers'];        
}        
$startRow_rsScorers = $pageNum_rsScorers * $maxRows_rsScorers;                
$query_rsScorers = "SELECT tbl_scorers.scorer, tbl_scorers.goals, tbl_scorers.match_id, tbl_fixtures.match_id  FROM tbl_fixtures, tbl_scorers WHERE tbl_fixtures.match_id = $match_id AND tbl_scorers.match_id = $match_id";        
$query_limit_rsScorers = sprintf("%s LIMIT %d, %d", $query_rsScorers, $startRow_rsScorers, $maxRows_rsScorers);        
$rsScorers = mysql_query($query_limit_rsScorers) or die(mysql_error());        
$row_rsScorers = mysql_fetch_assoc($rsScorers);        
if (isset($_GET['totalRows_rsScorers'])) 
{          
$totalRows_rsScorers = $_GET['totalRows_rsScorers'];        
} 
else 
{          
$all_rsScorers = mysql_query($query_rsScorers);          
$totalRows_rsScorers = mysql_num_rows($all_rsScorers);        
}        
$totalPages_rsScorers = ceil($totalRows_rsScorers/$maxRows_rsScorers)-1;                
do 
{            
echo $row_rsScorers['scorer'] ."(";            
echo $row_rsScorers['goals'];            
echo ")<br/>";        
}
while ($row_rsScorers = mysql_fetch_assoc($rsScorers));        
}        
echo "<br/>";    
} 
while ($row_rsFixtures = mysql_fetch_assoc($rsFixtures));
{
echo('</td><td><a href="report.php?match_id='.$row[match_id].'">View Report</a></td></tr>');
    echo "<tr><td>".date("d-M-Y", strtotime($row['match_date']))."</td><td>".$row[Opposition]."</td>";
echo ('<td align="center">'.$row[opposition_goals].'-'.$row[yardley_goals].'</td><td><b>Yardley</b></td>');
echo ('<td>'.$row[Result].'</td><td>');
if($row_rsFixtures['yardley_goals']>0)
{        
$match_id = $row_rsFixtures['match_id'];        
echo "Goal Scorers - ";                    
$maxRows_rsScorers = 10;            
$pageNum_rsScorers = 0;        
if (isset($_GET['pageNum_rsScorers'])) 
{          
$pageNum_rsScorers = $_GET['pageNum_rsScorers'];        
}        
$startRow_rsScorers = $pageNum_rsScorers * $maxRows_rsScorers;                
$query_rsScorers = "SELECT tbl_scorers.scorer, tbl_scorers.goals, tbl_scorers.match_id, tbl_fixtures.match_id  FROM tbl_fixtures, tbl_scorers WHERE tbl_fixtures.match_id = $match_id AND tbl_scorers.match_id = $match_id";        
$query_limit_rsScorers = sprintf("%s LIMIT %d, %d", $query_rsScorers, $startRow_rsScorers, $maxRows_rsScorers);        
$rsScorers = mysql_query($query_limit_rsScorers) or die(mysql_error());        
$row_rsScorers = mysql_fetch_assoc($rsScorers);        
if (isset($_GET['totalRows_rsScorers'])) 
{          
$totalRows_rsScorers = $_GET['totalRows_rsScorers'];        
} 
else 
{          
$all_rsScorers = mysql_query($query_rsScorers);          
$totalRows_rsScorers = mysql_num_rows($all_rsScorers);        
}        
$totalPages_rsScorers = ceil($totalRows_rsScorers/$maxRows_rsScorers)-1;                
do 
{            
echo $row_rsScorers['scorer'] ."(";            
echo $row_rsScorers['goals'];            
echo ")<br/>";        
}
while ($row_rsScorers = mysql_fetch_assoc($rsScorers));        
}        
echo "<br/>";    
} 
while ($row_rsFixtures = mysql_fetch_assoc($rsFixtures));	
echo('</td><td><a href="report.php?match_id='.$row[match_id].'">View Report<a></td></tr>');
        }
}

mysql_close($con);
?>
</table>
</div>
</div>
<div><div id="footers">designed and hosted by <a href="http://www.bravo14.co.uk" target="_blank">bravo14.co.uk</a></div>
<div id="footer">© 2005-<?php echo date("Y") ?> Yardley Hockey Club</div></div>
</div>
</div>
</body>
</html>
<?php 
mysql_free_result($rsFixtures); 
mysql_free_result($rsScorers); 
?>

 

Any ideas where I havw gone wrong

 

Cheers

Archived

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

×
×
  • 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.