我正在尝试使用PHP代码将数组值与MySQL表进行比较。但我一直收到以下错误: 调用未定义的方法panel_import :: query()
$availablePanel = array();
foreach ($panelists as $key => $value) {
$availablePanel[] = $value->_user_data['email'];
}
echo "<pre>";
print_r($availablePanel);
echo "</pre>";
$db = Zend_Registry::get('db');
$query = "SELECT email FROM user WHERE email IN('".implode("', '", $availablePanel)."')";
$array = array();
$result = $this->query($query);
while($row = $result->fetch_assoc()) {
$array[] = $data["email"];
}
以下数组是第一个print_r
的结果Array
(
[0] => dani6.AlfaWolf6@test.com
[1] => dani7.AlfaWolf7@test.com
[2] => dani33.AlfaWolf33@test.com
[3] => dani34.AlfaWolf34@test.com
)
我对PHP很陌生,所以如果这太容易被发现请原谅我,但在我问过去之前的5个小时里,我真的很累...!