Q:

not able to show all records in my database

i am testing my database by executing some MySQLi statements
in this case : i want to display all the records of 2 specefic rows (name,score)
i checked how to do such thing in PHP , and i did it
problem is , the page is not showing anything at all , (blank empty page)
My code : 
<?php
$servername = "sql3.freesqldatabase.com";
$username = "MY USERNAME";
$password = "MY PASSWORD";
$dbname = "MY DBNAME";

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

$sql = "SELECT name,score FROM Scores");
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo "Name: " . $row["name"]. " " . $row["score"]. "<br>";
    }
} else {
    echo "0 results";
}
$conn->close();
?>

and , i executed the same query in phpMyAdmin Control Panel , and it worked
What have i done wrong ?

A:

This line
$sql = "SELECT name,score FROM Scores");

Should be
$sql = "SELECT name,score FROM Scores";

This syntax error will cause an error and your environment is likely suppressing errors/warnings.

