我正在使用此代码从我的数据库中提取数据,但它不起作用。有任何想法吗?
Code:
<?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->query($query);
while($info = mysql_fetch_array($query, MYSQL_ASSOC)) {
echo $info['scheduled_date'];
echo "<br>";
echo $info['customer_name'];
echo "<br>";
echo $info['status'];
echo "<br>";
echo $info['kaspersky_template'];
echo "<br>";
echo $info['pcpickup_template'];
}
?>
错误代码:致命错误:在第 20 行的 /home/projectu/public_html/sub/scheduled.php 中的非对象上调用成员函数 query()