TotalRows is incorrect
Hi,
I perform the following query on a recordset that should return 62 records. In fact, if I set WA_MySQLi_RS to 0 it does. However, if I set the WA_MySQLi_RS value to 15 the TotalRows value is 15.
$rsInvoices = new WA_MySQLi_RS("rsInvoices",$sslcourses,15);
$rsInvoices->setQuery("SELECT i.InvoiceID, DATE_FORMAT(i.DatePurchased, '%d/%m/%y') AS MWDatePurchased, DATE_FORMAT(i.DatePaid, '%d/%m/%y') AS MWDatePaid, i.Total, os.Name, CONCAT(u.FirstName, ' ', u.LastName) AS FullName FROM invoices i JOIN orderstatus os ON os.OrderStatusID = i.OrderStatusID JOIN users u ON u.UserID = i.UserID ORDER BY i.DatePurchased DESC");
$rsInvoices->execute();
<?php echo $rsInvoices->TotalRows ?>
The above displays 15. It should display 62.
I also stripped the select to its bare minimum in case that was the problem...
$rsInvoices = new WA_MySQLi_RS("rsInvoices",$sslcourses,15);
$rsInvoices->setQuery("SELECT i.InvoiceID FROM invoices i");
$rsInvoices->execute();
It still returns 15.
I only want to display 15 results on a page and have paging controls to move to other page results.
First page results are... 1 to 15 of 15
The Next Page pageing control does not take me to the "missing" results.
Hope you can help.
Regards,
Mark