24.02.2018, 11:17
Hello there,
I know this is not really pawn. But it is pawn related.
I am creating a user control panel and i want to list reports on the website for admins.
This code works perfect but i have trouble with page navigation.
If i use the same way as in samp like count++ it always returns 1.
How do i succesfully count rows? because numrows and sqlite_num_rows dont work.
I did try to follow these :
http://php.net/manual/en/function.sqlite-num-rows.php
But this always result into a fatal error
Any help would be appreciated
I know this is not really pawn. But it is pawn related.
I am creating a user control panel and i want to list reports on the website for admins.
This code works perfect but i have trouble with page navigation.
If i use the same way as in samp like count++ it always returns 1.
How do i succesfully count rows? because numrows and sqlite_num_rows dont work.
PHP код:
$record_index= ($page-1) * $limit;
$sql = "SELECT * FROM REPORTS LIMIT $record_index, $limit";
$stmt = $db->query($sql);
while($row = $stmt->fetchArray(SQLITE3_ASSOC) )
{
$countrows = $stmt->numRows(); // error
http://php.net/manual/en/function.sqlite-num-rows.php
But this always result into a fatal error
Код:
Fatal error: Call to undefined method SQLite3Result::numRows() in D:\AppServ\www\ucp\reports.php on