O to mi chodziło dziękuje..
Teraz druga sprawa czy to jest dobry pomysł:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
include('includes/Pager.class.php');
include('includes/EPager.class.php');
$orders = array('id', 'nazwa', 'data', 'autor'); $pager = new EPager('admin', null, false, $orders); $pager->RecordsPerPage = 5; $sql = 'SELECT * FROM newsy';
$sqlCount = preg_replace('/select.*?from/i', 'select count(*) from', $sql);
$res = $db->query($sqlCount);
$row = $res->fetch_array();
$sql = $pager->Generate($sql, $row[0]);
$headers = array('id' => '', 'nazwa' => '', 'data' => '', 'autor' => '');
$pager->OrderHeader($headers);
$zap_news = $db->query($sql);
$tpl->set_var('ZABEZPIECZENIE', '');
$tpl->set_var('nazwa_sort', $headers['nazwa']['LINK']);
$tpl->set_var('data_sort', $headers['data']['LINK']);
$tpl->set_var('autor_sort', $headers['autor']['LINK']);
Ponieważ nie mogę, wysłać zapytania z twojej klasy?