When I am echo the $result
variable. It display an error msg like this:
Catchable fatal error: Object of class mysqli_result could not be converted to string in D:\Inspiration\server\Table2_yahooData_db.php on line 13
<?php
// connect to the dataBase
$conn = mysqli_connect('localhost', 'root', '', 'yahooData');
//checking Connection.
if (!$conn) {
die('Error connection failed: ' . mysqli_connect_error($conn));
}
// Creating select query Using sql commands.
$sql = "SELECT * FROM User;" ;
$result = mysqli_query($conn, $sql);
echo $result;
mysqli_close($conn);
?>