2
我想通過AdvInfo表搜索並存儲主鍵(如果Unit = Child)。使用while循環將數據存儲到php數組中?
$result = mysqli_query($conn, "SELECT * FROM AdvInfo WHERE Unit = Child");
while ($row = mysqli_fetch_array($result, SQLSRV_FETCH_ASSOC))
{
$childhbc = array_merge($childhbc, $row[0]);
echo $childhbc[0];
}
可以呼應你的選擇查詢? –
號碼回顯$ childhbc也不會返回任何內容 – Erkdance