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

how to use LIMIT / OFFSET - sql

Thread began 5/13/2019 9:50 am by s.joiner74419001 | Last modified 5/17/2019 11:51 am by Ray Borduin | 32 views | 6 replies |

s.joiner74419001

how to use LIMIT / OFFSET - sql

I have a Database table ( see 'screenshot-1' ) where I want to select certain rows and display the data.

So for example If I want to query the database and select row 3 I am using the following recordset:

<?php
$rsBlock3 = new WA_MySQLi_RS("rsBlock3",$RTMFi,2,1);
$rsBlock3->setQuery("SELECT application_blocks.* FROM application_blocks WHERE application_blocks.applicant_id = ? ORDER BY application_blocks.block_id ASC");
$rsBlock3->bindParam("i", "".$_GET['appID'] ."", "-1"); //WAQB_Param1
$rsBlock3->execute();
?>

But this does not seem to work I just get the first row in the table.

Am I missing something here?

Thanks in advance

Sign in to reply to this post

Ray BorduinWebAssist

Length is first and position is second... so if you want to select 1 row at position 3 you would use:

$rsBlock3 = new WA_MySQLi_RS("rsBlock3",$RTMFi,1,3);

Sign in to reply to this post

s.joiner74419001

This doesn't appear to work for me for some reason I have used three recordsets with the following:

$rsBlock3 = new WA_MySQLi_RS("rsBlock3",$RTMFi,1,1);
$rsBlock3 = new WA_MySQLi_RS("rsBlock3",$RTMFi,1,2);
$rsBlock3 = new WA_MySQLi_RS("rsBlock3",$RTMFi,1,3);

All give me the same result.

I've attached page and relevant screenshots

Thanks in advance

Attached Files
update-application.php
Sign in to reply to this post

Ray BorduinWebAssist

What version of rsobj.php are you using?

Sign in to reply to this post

s.joiner74419001

Hi ray..
I'm using version 2.27

Sign in to reply to this post

Ray BorduinWebAssist

Try using the latest version that I've attached and let me know if you get the same results.

Attached Files
rsobj.php
Sign in to reply to this post

s.joiner74419001

Thanks Ray that has corrected the issue!

Sign in to reply to this post

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