close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

TotalRows is incorrect

Thread began 1/18/2017 5:14 pm by Mark | Last modified 1/19/2017 2:17 pm by Mark | 506 views | 1 replies


TotalRows is incorrect


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");

<?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");

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.



Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...