Advertisement
norberto1112

Error querying.... empty query

May 14th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. <?php
  2.  
  3. $dbc=mysqli_connect('127.0.0.1','root','','tys') or die('nope');
  4.  
  5. $query = mysql_query("SELECT * FROM tys_post");
  6.  $result = mysqli_query($dbc, $query)
  7.     or die('Error querying database.');
  8.  
  9.   while ($row = mysqli_fetch_array($result)) {
  10.     echo $row['tys_title'];
  11.   }
  12. mysqli_close($dbc);
  13. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement