I had query for data in this SQL:
//query by location total post
$sql = 'SELECT ljj.job_id, count(ljj.job_id) as count, ljj.job_type FROM {local_jobs_job} ljj INNER JOIN {local_jobs_location} ljl ON ljj.job_location = ljl.location_id GROUP BY ljj.job_type';
//get the query into record
$data = $DB->get_records_sql($sql);
The output is here:
Array ( [1] => stdClass Object ( [job_id] => 1 [count] => 8 [job_type] => 0 ) [3] => stdClass Object ( [job_id] => 3 [count] => 7 [job_type] => 1 ) )
I need to change the value of:
[job_type] => 0 to [job_type] => 'Job'
[job_type] => 1 to [job_type] => 'Internship'
I do not know how to get to the value as it is an object array.
How to get the value and replace it?