<?php foreach(array_chunk($biolink_pages, 3) as $page ) { ?>
<div class="small-thumb-group">
<?php foreach($page as $detail) { ?>
<img src="<?= $detail['name']; ?>" alt="popular collection">
<img src="<?= $detail['name']; ?>" alt="popular collection">
<img src="<?= $detail['name']; ?>" alt="popular collection">
<?php } ?>
</div>
<? }; ?>
public function get_sql_where($table_prefix = null) {
if(!$this->is_processed) $this->process();
$where = '';
$table_prefix = $table_prefix ? "`{$table_prefix}`." : null;
/* Filters */
foreach($this->filters as $key => $value) {
if(isset($this->filters_types[$key])) {
switch($this->filters_types[$key]) {
case 'json_contains':
/* Only allow numbers for array json searching */
$value = (int) $value;
$where .= " AND JSON_CONTAINS({$table_prefix}`{$key}`, '{$value}', '$')";
break;
}
} else {
/* Classic */
$where .= " AND {$table_prefix}`{$key}` = '{$value}'";
}
}
/* Search */
if($this->search && $this->search_by) {
$where .= " AND {$table_prefix}`{$this->search_by}` LIKE '%{$this->search}%'";
}
return $where;
}