close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

converting to mysqli

Thread began 6/24/2014 6:09 am by Jamie | Last modified 7/01/2014 11:47 am by Jamie | 1980 views | 21 replies


well am trying to get a Tom Muck pagination working with the mysqli structure

The pagination code is

for ($i=0; $i <= $totalPages_News; $i++) {
$TFM_PagesEndCount = $i + 1;
if($i != $pageNum_News) {
printf('<a href="'."%s?pageNum_News=%d%s", $currentPage, $i, $queryString_News.'">'.$TFM_PagesEndCount."</a>");
if($i != $totalPages_News) echo(" | ");

and the associated recordset in mysql is

mysql_select_db($database_PowerCMSConnection, $PowerCMSConnection);
$query_News = "SELECT * FROM news WHERE Live = 1 ORDER BY NewsDate ASC";
$News = mysql_query($query_News, $PowerCMSConnection) or die(mysql_error());
$row_News = mysql_fetch_assoc($News);
$totalRows_News = mysql_num_rows($News);

$queryString_News = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_News") == false &&
stristr($param, "totalRows_News") == false) {
array_push($newParams, $param);
if (count($newParams) != 0) {
$queryString_News = "&" . htmlentities(implode("&", $newParams));
$queryString_News = sprintf("&totalRows_News=%d%s", $totalRows_News, $queryString_News);

I have tried to modify the code using the mysqli rs of

$News = new WA_MySQLi_RS("News",$DBConnection,2);
$News->setQuery("SELECT * FROM news WHERE Live = 1 ORDER BY NewsOrder DESC");

but am unable to get the pagination itself working. I 'spoke' with Tom Muck via email and he said that the rs needs to be changed... just I dont know how.


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...