問題描述
我是 mysqli 的新手,并開始嘗試學(xué)習(xí)基本的東西.關(guān)于這個(gè)我的例子(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();
這里我收到此錯(cuò)誤 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.
推薦答案
這個(gè)答案是很久以前寫的,已經(jīng)變得無關(guān)緊要了.
This answer has been written very long time ago and become irrelevant.
從那時(shí)起,我學(xué)會(huì)了解決這個(gè)問題的正確方法,并將它寫在了這個(gè)答案中.請(qǐng)導(dǎo)航到那??里.
Since then I learned the proper solution for this problem and wrote it in this answer. Please navigate there.
這篇關(guān)于mysqli - fetch_Array 錯(cuò)誤調(diào)用非對(duì)象 mysqli 上的成員函數(shù) fetch_array()的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!