php - mysqli_fetch_all() is not executing, or issue with MYSQLI_ASSOC -


i have encountered interesting problem have no idea how fix. creating website on xampp, works fine. once uploaded server, portion of php code not being executed. placed echo statements throughout code determine why php function stopped, , statement here seems issue - $row_id = mysqli_fetch_all($r, mysqli_assoc);

there earlier database pull goes -

$id = $_session['admin_id']; $q = "select user_id adminsofusers admin_id = $id"; $r = mysqli_query($dbc, $q) or trigger_error("query: $q\n<br> mysql error: " . mysqli_error($dbc)); 

i have tried running mysqli_num_rows() on $r , returns 1, should, have determined issue lies $row_id = mysqli_fetch_all($r, mysqli_assoc);

everything after statement disregarded, , put in php script after not matter. still working fine on local server, however. ideas? problem hosting server?

mysqli_fetch_all() needs php 5.3+ , morever requires mysqlnd installed. a

alternatively can use

$result = mysqli_query($con,$query); while($row = mysqli_fetch_assoc($result)) {     $arr[] = $row; } 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -