I'm a new php user, building a php dynamic site which is almost finished. But there is a syntax problem of php on the detail_member displaying page, usually I can figure out what is the problem is, but using join multiple table to pull the records on the page that need a sentence to present the record of 'Sunday' in the timesheet table to match up memberID in the member table. Those two table has a relational key'memberID'. A memberID is auto-incremental primary key in the member table and another memberID is a foreign key in the timesheet table, there is a auto-incremental primary key in the timesheet table. But I just want to pull the record of the specific person's attendance on Sunday, not all person's record of Sunday attendance. Even took me ages thinking about, I still don't have a clue how to write a echo statement for this purpose, so I guess I have to cry out for help, can someone give me a help? Thanks.
<?php require_once('../../Connections/icccon.php'); ?>
<?php
mysql_select_db($database_icccon, $icccon);
$query_Recordset1 = "SELECT * FROM timesheet, member WHERE timesheet.memberID=member.memberID;";
$Recordset1 = mysql_query($query_Recordset1, $icccon) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>timesheet_resultpage</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="30%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="32%">Name</td>
<td width="32%">Attendance</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['name']; ?> </td>
<td><?php echo $row_Recordset1['Sunday']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>