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

rating

Paginator PHP compatible with MySQLi

Thread began 9/20/2018 6:28 pm by Mike | Last modified 4/10/2020 12:50 pm by Ray Borduin | 280 views | 9 replies |

Mike

Paginator PHP compatible with MySQLi

I'm searching a "paginator PHP" compatible with MySQLi to use with the new version of DataBridge (to be more specific, in a page with a list of recordset generated with the last release candidate version of DataBridge).
At the moment I'm using this one from DMXzone but is too old and not works:
https://www.dmxzone.com/go/16577/dmxzone-paginator-php

Any suggestions?
Thanks.

Sign in to reply to this post

Ray BorduinWebAssist

I threw together a pagination include that will work with mysqli.
You will need the latest version of the rsobj.php file (version 2.16) in order for this to work.

Just reinstall the databridge beta or mysqli server behaviors to get a rsobj version that will work.

Just add this file to your results page with:

php:
<?php 

  $rs 
$Recordset1;
  require_once(
"results_nav.php"); 
?>



And edit the first line to put your recordset name in.

There is CSS in the file that you will probably want to move into your .css file, but it will give you a good start and you should be able to edit it to look like the sample designs you sent pretty easily.

Attached Files
results_nav.php
Sign in to reply to this post
Did this help? Tips are appreciated...

Mike

Great, thanks!

Sign in to reply to this post

Rokon

Originally Said By: Ray Borduin
  I threw together a pagination include that will work with mysqli.
You will need the latest version of the rsobj.php file (version 2.16) in order for this to work.

Just reinstall the databridge beta or mysqli server behaviors to get a rsobj version that will work.

Just add this file to your results page with:
php:
<?php 

  $rs 
$Recordset1;
  require_once(
"results_nav.php"); 
?>


And edit the first line to put your recordset name in.

There is CSS in the file that you will probably want to move into your .css file, but it will give you a good start and you should be able to edit it to look like the sample designs you sent pretty easily.  



Dear Ray

Thanks for the nice navigation as I was searching for it too. Meanwhile I am experiencing some problem of showing records. Sometime it shows correctly all the navigation and sometime it does not show the navigation at all.

I saw that when I put in below place 5 then it shows the menu correctly but if I change that to like 10 then the menu does not show up while I have results of 17 and it just show result counter text which shows the total number of results but no navigation shows up.

<?php
$SearchPage = new WA_MySQLi_RS("SearchPage",$hadithbd,5);
$SearchPage->setQuery("SELECT * FROM hadith_main_vw");
$SearchPage->execute();
?>

Sign in to reply to this post

Ray BorduinWebAssist

Please send a URL where I can see the problem and FTP access and I'll take a look.

Sign in to reply to this post
Did this help? Tips are appreciated...

Rokon

Originally Said By: Ray Borduin
  Please send a URL where I can see the problem and FTP access and I'll take a look.  


Please see the ftp detail in the private message.

Page: search.hadithbd.com/index.php

Search with the word ঘোড়ার লেজ
and select exact match & You will notice the problem

My result shows

Result (s): 1 to 5 of 9 only and no navigation icon for next page.

Sign in to reply to this post

Ray BorduinWebAssist

In the navigation include file, this line:
if ($pages>1) {

should be:
if ($pages>0) {

it uses a zero based index, so when the results show exactly two pages it wasn't displaying when it should.

Sign in to reply to this post
Did this help? Tips are appreciated...

Rokon

Originally Said By: Ray Borduin
  In the navigation include file, this line:
if ($pages>1) {

should be:
if ($pages>0) {

it uses a zero based index, so when the results show exactly two pages it wasn't displaying when it should.  



Thanks now it is working!

Sign in to reply to this post

Rokon

Pagination with custom record selection

Dear Ray

For this pagination is there any way to select custom record number instead of a fix record number always, like from a drop down list if the user select 10 then it should show 10 record and if select 5 then it will show 5 record.

Sign in to reply to this post

Ray BorduinWebAssist

That can be done in your recordset. You have to save a session variable to record the user's choice of how many records and give it a default value of however many records you want displayed at first. Then use that session variable in the recordset code in place of the number of rows to display. It would look something like:

$Recordset1 = new WA_MySQLi_RS("Recordset1",$pubsitepro_site,$_SESSION["RecordsToDisplay"]);

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

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

Content

rating

Layout

rating

Ease of use

rating

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