Hi guys , can someone help me with this code its giving me "query was empty Error" its connecting but...?
and please find attached the entire php page for clarity.
Thanks .
<?php
//connect database
require_once "connect_to_mysqli.php";
//query the datbase
$sqlcommand = "SELECT post_id, title, body From posts ORDER by post_id desc";
$query = mysql_query($sqlCommand) or die (mysql_error());
while($row = mysql_fetch_array($query)) {
$title = $row["title"];
echo "<h3>$title</h3>";
}
// Free the result set if it is large
mysql_free_result($query);
// close mysql connection
mysql_close();
?>
18406_.txt