Dances Done in 2017 – Ordered by Date (Latest first)

[insert_php]
$servername = “database4.lcn.com”;
$username = “LCN420200_master”;
$password = “f0urW1n$5”;
$dbname = “patshaw_info_Dances2017”;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}

$sql = “SELECT COUNT(*) AS totalDances FROM dances”;
$result = $conn->query($sql);
$row = $result->fetch_assoc();
echo $row[‘totalDances’].” Pat Shaw dances called in 2017.”;

$conn->close();

[/insert_php]

Top 10 Dances

Top 10 Countries

http://www.patshaw.info/wp-content/uploads/2018/01/Top10dances-e1549210475802.gif” alt=”Top 10 Dances”> Top 10 Countries

Filter by Month

[insert_php]
$servername = “database4.lcn.com”;
$username = “LCN420200_master”;
$password = “f0urW1n$5”;
$dbname = “patshaw_info_Dances2017”;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}

$sql = “SELECT * FROM dances ORDER BY Date DESC”;
$result = $conn->query($sql);

if ($result->num_rows > 0) {
echo ”

“;
// output data of each row
while($row = $result->fetch_assoc()) {
$date = $row[‘Date’];
// Format the date
$date1 = strtotime($date);
$date2 = date(“j F”,$date1);
echo ”

“;
}
echo ”

Title Place Date Caller/Teacher
” . $row[“Title”]. “ ” . $row[“Place”]. “ $date2 ” . $row[“Caller”]. “

“;
} else {
echo “0 results”;
}

$conn->close();
[/insert_php]