Jump to content

Xtrapositive

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Everything posted by Xtrapositive

  1. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.