Displaying all the customer records
connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT ID, Name, Mobile FROM Customer";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "Customer ID: " . $row["ID"]. " - Name: " . $row["Name"]. " Mobile: " . $row["Mobile"]. "
";
}
} else {
echo "0 results";
}
$conn->close();
?>