Currently on my system, I'm calling each column at once:
$sql2 = mysqli_query($db, "SELECT group_id FROM login WHERE userid = '$userid'");
$exibe2 = mysqli_fetch_assoc($sql2);
$_SESSION['group_id']=$exibe2['group_id'];
And in the file I'm calling it like this:
echo ' '.$_SESSION['group_id'].' ';
It works perfectly for just one data in a table, but if I wanted to do something like:
$sql4 = mysqli_query($db, "SELECT account_id,userid,sex,email,group_id,last_ip,unban_time,diasvip,cash2 FROM login ORDER BY account_id WHERE userid = '$userid'");
$exibe4 = mysqli_fetch_assoc($sql4);
In case I want to fetch several columns that have multiple results each, how do I call this result in PHP?