問題描述
我是 mysqli 的新手,并開始嘗試學習基本的東西.關于這個我的例子(http://php.net/manual/en/mysqli-result.fetch-array.php) 我正在嘗試 fetch_array.這是我的代碼.
I am new to mysqli and started trying to learn basic things. With respect to this i example (http://php.net/manual/en/mysqli-result.fetch-array.php) i was trying fetch_array. Here is my code.
$sqlGetChartData = "SELECT date, ratepersqft, location
FROM ratepersqft
WHERE project_id = 1";
$runGetChartData = $mysqli->query($sqlGetChartData);
while($rowGetChartData = $runGetChartData->fetch_array(MYSQLI_BOTH))
$arrGetChartData[] = $rowGetChartData;
print "<pre>";
print_r($arrGetChartData);
exit();
這里我收到此錯誤 Call to a member function fetch_array() on an non-object on a non-object on line next to while condition line.我嘗試使用谷歌搜索它并沒有得到我的問題的結(jié)果.希望我的問題很清楚.提前致謝.
Here i am getting this error Call to a member function fetch_array() on a non-object on line next to while condition line. I tried googling it and did not get result for my problem. Hope my question is clear. Thanks in Advance.
推薦答案
這個答案是很久以前寫的,已經(jīng)變得無關緊要了.
This answer has been written very long time ago and become irrelevant.
從那時起,我學會了解決這個問題的正確方法,并將它寫在了這個答案中.請導航到那??里.
Since then I learned the proper solution for this problem and wrote it in this answer. Please navigate there.
這篇關于mysqli - fetch_Array 錯誤調(diào)用非對象 mysqli 上的成員函數(shù) fetch_array()的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!