this code for searching in my page
Code: Select all
$coachs = $_GET["coachs"];
$dates = $_GET["dates"];Code: Select all
$query = mysql_query("SELECT * FROM table1 WHERE s_coach='$coachs' AND s_date='$dates' ORDER BY s_time ASC ") or die(mysql_error());
$result = mysql_numrows($query);Code: Select all
$query = mysql_query("SELECT * FROM table2 WHERE s_coach='$coachs' AND s_date='$dates' ORDER BY s_time ASC ") or die(mysql_error());
$result = mysql_numrows($query);Code: Select all
$query = mysql_query("SELECT * FROM table3 WHERE s_coach='$coachs' AND s_date='$dates' ORDER BY s_time ASC ") or die(mysql_error());
$result = mysql_numrows($query);Code: Select all
<?php
if($row = mysql_fetch_array($query))
{
do
{
?>
<table>
<tr>
<td>
<form>
<input type="text" name="sta" value="<?php echo $row["student1"] ?>" />
<input type="text" name="t1" value="<?php echo $row["s_time"] ?>" />
<input type="text" name="sdate" value="<?php echo $row["s_date"] ?>" />
<input type="text" name="ncoach" value="<?php echo $row["s_coach"] ?>" />
<input type="submit" value="submit">
</form>
</td>
<td>
<form>
<input type="text" name="sta" value="<?php echo $row["student2"] ?>" />
<input type="text" name="t1" value="<?php echo $row["s_time"] ?>" />
<input type="text" name="sdate" value="<?php echo $row["s_date"] ?>" />
<input type="text" name="ncoach" value="<?php echo $row["s_coach"] ?>" />
<input type="submit" value="submit">
</form>
</td>
<td>
<form>
<input type="text" name="sta" value="<?php echo $row["student2"] ?>" />
<input type="text" name="t1" value="<?php echo $row["s_time"] ?>" />
<input type="text" name="sdate" value="<?php echo $row["s_date"] ?>" />
<input type="text" name="ncoach" value="<?php echo $row["s_coach"] ?>" />
<input type="submit" value="submit">
</form>
</td>
</tr>
</table>
<?php }
while ($row = mysql_fetch_array($query));
echo "</td>";
} else {
echo "no data"
}
?>how code for multiple queries ?