I need to fetch all the info from a query , so I can use it for other purposes, the issue is that I'm just getting 1 result of each kind and I need them all, here is my script:
<?php
require_once 'init.php';
$base_datos = DB::getInstance();
$base_datos->query ("SELECT lname, fname, category,user_id, SUM(points) as Point, SUM(amount)as Amount FROM request GROUP BY user_id");
$get_info = $base_datos->results();
$real_info = $get_info[0];
$name = $real_info->lname;
$last_name = $real_info->fname;
$categories = $real_info->category;
echo "$name";
///var_dump ($get_info);
?>
when echo $name all i get is one name i need to get them all and so on with the other value, when i do var_dump i got all i need, but i need to loop through,I'd searched all around and was not lucky.
this is what I'm trying to output on php page