请尝试从表(addclique)中获取mysql行(' clique_id')中的数据并插入另一个表(通知)但它无法正常工作。它显示一个空白屏幕。
$select= "SELECT * FROM addclique WHERE adder_id = :session_id";
$param1= array ('session_id' => $_SESSION['id']);
$cliques= $db->query($select, $param1);
foreach($cliques as $key)
{
$array[] = $key['clique_id'];
}
var_dump($array);
echo "true";
exit;
if ($result= $db->query($sql, $param)) {
$notijfy = new Notification();
$notijfy->addCircle($param['member_id'],$array[]);
header ("Location: success_circle.php");
}
function addCircle($id_involve, $id_user){
$sql2 = "INSERT INTO notification (id_involve, id_user, category) VALUES (:involve, :user, 'circle')";
$param = array ('involve' => $id_involve, 'user' => $id_user);
$result2= $this->db->query ($sql2, $param);
}