Pulling data from database in PHP error
<p>I am using this code to pull data from my database but it is not working. Any ideas?</p>

<pre><code>Code:
&lt;?php

$db = new mysqli($host,$user,$pass,$name);

/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}
    $query = "SELECT * FROM Sublist WHERE 1 LIMIT 0 , 30";
    $result = $mysqli-&gt;query($query);

while($info = mysql_fetch_array($query,  MYSQL_ASSOC)) {
echo $info['scheduled_date'];
echo "&lt;br&gt;";
echo $info['customer_name'];
echo "&lt;br&gt;";
echo $info['status'];
echo "&lt;br&gt;";
echo $info['kaspersky_template'];
echo "&lt;br&gt;";
echo $info['pcpickup_template'];

 } 
?&gt;
</code></pre>

<p>Error code: Fatal error: Call to a member function query() on a non-object in /home/projectu/public_html/sub/scheduled.php on line 20</p>
