Racing Australia
$db database successfully!";
}
$query = sprintf("SELECT * FROM horses
WHERE race_date >= %s
ORDER BY race_date, venue, race;", $conn->quote(date("Y-m-d")));
$stmt = $conn->query($query);
// $r = $stmt->fetch(PDO::FETCH_ASSOC);
echo '
';
$table_head = <<
| id |
venue |
race_date |
race |
horse |
TABLEHEAD;
$table_foot = <<
TABLEFOOT;
echo( $table_head );
$new_venue = '';
$new_day = '';
$head_displayed = False;
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) : ?>
' . htmlspecialchars($row['race_date']) . '';
echo $table_head;
$new_day = $row['race_date'];
$head_displayed = True;
}
} else {
$new_day = $row['race_date'];
}
if ( $new_venue != '' ) {
if ( $new_venue != $row['venue'] ) {
echo $table_foot;
echo $table_head;
$new_venue = $row['venue'];
}
} else {
$new_venue = $row['venue'];
}
?>
|
|
|
|
|
getMessage();
}
?>