I'm trying to store the image into an array. My php code as below:
$query_search1 = "SELECT profilePicture FROM rocket WHERE username='".$rocketName."'";
$query_exec1 = mysqli_query($db->getConnection(),$query_search1) or die(mysqli_error($db->getConnection()));
$row1 = mysqli_fetch_assoc($query_exec1);
//$rocketPic = $row1['profilePicture'];
$json = array();
//$json['rocket_profile'][] = $row1;
if(mysqli_num_rows($query_exec1)){
while($row2 = $row1){
$json['rocket_profile'][] = $row2;
}
}
Data type for profilePicture is BLOB. Below is the error I got:
Allowed memory size of 134217728 bytes exhausted (tried to allocate 36 bytes)
All I want is to store it as json to be used in Android application.