Hi, thank you Nothing was returned from try error, unless I have a setting or something that is hiding the error message? Script below...
<?php
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "databasename";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql = "SELECT id, column FROM databasetable";
$result = mysqli_query($conn, $sql);
$result = mysqli_query($conn, $sql);
// error check query. mysqli_query returned false on error
if($result)
{
// process query results
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
echo $sql;
echo "id: " . $row["id"]."<br>";
}
} else {
echo "0 results";
}
}
else
{
// get the error from the query
trigger_error('Query returned an error: ' . mysqli_error($conn));
}
mysqli_close($conn);
?>