tournaments

[insert_php]

$path = $_SERVER[‘DOCUMENT_ROOT’];
$path .= ‘/wp-config.php’;
require_once($path);

$conn = new mysqli (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);

$sql = “SELECT * from tournaments where start_date >= (CURDATE() – INTERVAL 3 DAY) order by start_date”;

$query = mysqli_query($conn, $sql);

if (!$query) {
die (‘SQL Error: ‘ . mysqli_error($conn));
}
echo

‘;

while ($row = mysqli_fetch_array($query))
{
echo ‘

‘;
}
echo

Start DateEvent NameCityRegionGenderStyle
‘.$row[‘start_date’].’‘.$row[‘event_name’].’‘.$row[‘city’].’‘.$row[‘region’].’‘.$row[‘gender’]. ‘‘.$row[‘style’]. ‘

‘;
[/insert_php]