Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C ...
This is code
function db_result_to_array($result) {
$res_array = array();
for ($count=0; $row = mysql_fetch_array($result); $count++) {
$res_array[$count] = $row;
}
return $res_array;
}
So, the error is in this line
for ($count=0; $row = mysql_fetch_array($result); $count++)
I tried
mysql_fetch_object()
mysql_fetch_assoc()
mysql_fetch_row()
and didn't work
I tried
mysql_fetch_array($result, MYSQL_ASSOC)
mysql_fetch_array($result, MYSQL_NUM)
mysql_fetch_array($result, MYSQL_BOTH)
and it didn't work. Could you help me resolve this?