_hots this- model- DB- query SELECT img name FROM hots foreach _hots A

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
$_hots = $this->model->DB->query('SELECT `img`,`name` FROM `hots`');
foreach ($_hots AS $_hots2) $_hot[] = $_hots2;
шаблон:
{foreach $_hot as $hot}
<img src="/public/images/hots/{$hot.preview}" border="0">
{/foreach}
или же лучше
$_hot = $this->model->DB->query('SELECT `img`,`name` FROM `hots`');
шаблон:
{foreach $_hot as $hot}
<img src="/public/images/hots/{$hot.preview}" border="0">
{/foreach}