Joomla数据库查询列参数OS事件管理器

I am using OS Events Manager, and I need to show query from a table column to show the "field_speaker" which is the under the params column in OS Events Manager. I have this code: `

$query   = $db->getQuery(true)
->select('a.*')
->from('#__eb_speakers AS a')
->innerJoin('#__eb_events AS b ON a.id = b.speaker_id')
->where('b.event_id = ' . $event->id)
->order('b.id');
$db->setQuery($query);
$speakers = $db->loadObjectList();
print_r($speakers); ?>'

I don't know how to call the column params "field_speaker" as shown in the image I provided... If you look at my code I only have the eb_events-which is where everything is going wrong I guess???

Any help would be greatly appreciated. I know a little PHP-obviously not enough... Samenter image description here

You seem to be only interested in the params column, so only write that column in the SELECT clause and use loadColumn() to access the data (generate a 1-dimensional array for simpler handling).

https://docs.joomla.org/Selecting_data_using_JDatabase#Single_Column_Results

If you want more columns than params, you should name them explicitly in your query, and use a different method to collect the result set. (See the link above)

My untested suggestion:

$query = $db->getQuery(true)
            ->select('a.params')                 // only ask for what you intend to use
            ->from('#__eb_speakers AS a')
            ->innerJoin('#__eb_events AS b ON a.id = b.speaker_id')
            ->where('b.event_id = ' . (int)$event->id)   // for security cast as an integer
            ->order('b.id');
$db->setQuery($query);
if (!$params = $db->loadColumn()) {
    echo "No Data Found for " . (int)$event->id;
} else {
    foreach ($params as $param) {
        $speakers[] = json_decode($param, true)['field_speaker']; // I assume this key always exists
    }
}
var_export($speakers);  // this will show you the isolated speaker data

p.s. When you have Joomla-based questions, please post them in Joomla Stack Exchange so that that community has some new stuff to chew on.