Hello i am doing an request to an SQL Database (in php) witch looks like this...
SELECT firstname FROM users WHERE job = '$jobL'
Lets assume in the Database are three users with the $jobL namend: Mike, Steve & Danny.
Expected Output:
array("mike", "steve", "danny")
Given Output:
array("mike")
So mike is the first result in the users table. SQL only gets me the first result, i want to get all results matching my query, not only the first one.
Thanks
EDIT: Its an php function...
function GetJobMembers($jobL) { //Function to get all Members of an Job in an Array
global $db;
$AllWithJobSQL = $db->query("SELECT firstname FROM users WHERE job = '$jobL'");
$AllUsersWithJob = $AllWithJobSQL->fetch_assoc();
return $AllUsersWithJob;
}
i tested it with $jobL = groove //GTA RP Server stuff
my db manual serach:
