View Full Version : Error of some sort with getting info from MySQL table?

03-20-2011, 12:27 AM
When I try to access some information from a MySQL server and display it in a table, it gives this error:

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\summerservices\includes\frontpage. php on line 13

And the PHP I'm using to access the data:

$query = "SELECT * frontpage";
$result = mysqli_query($cxn,$query);

//Display the results in a table
echo "<table cellspacing='0' border ='0' cellpadding='0' width='100%'>";
echo "<tr><td colspan='100%' style='text-align: center'><hr />Updates on the business:<hr /></td></tr>\n";
while($row = mysqli_fetch_assoc($result)){
echo "<tr><td colspan='100%'>{$row['message']}</ hr></td></tr>\n";
echo "</table>\n";
?>All of that was/is within a <div> tag. Then, that PHP file with the div is included in the main page of my site.

03-30-2011, 10:06 AM
Your SQL is wrong

should be..