MySQL Forums
Forum List  »  Microsoft Access

Re: Beginning and end of table
Posted by: Robert Tulloch
Date: March 29, 2018 07:00AM

Hi:

My remaining problem:

Code for scrolling previous in below DBI->trace block

The bound select statement works fine in php MyAdmin SQL causing the previous record to be displayed.

When executed in the program that produced the DBI-trace, it fails and reloads the same record 'Dare'.

parse_params statement SELECT * FROM users WHERE lastname <= (SELECT MAX(lastname) FROM users WHERE lastname < ?) ORDER BY lastname DESC LIMIT 1
Binding parameters: SELECT * FROM users WHERE lastname <= (SELECT MAX(lastname) FROM users WHERE lastname < 'Dare\"') ORDER BY lastname DESC LIMIT 1

The block below is produced when getting the next record and it works fine in both the program and php MyAdmin SQL producing the "next" record.

parse_params statement SELECT * FROM users WHERE lastname >= (SELECT MIN(lastname) FROM users WHERE lastname > ?) ORDER BY lastname ASC LIMIT 1
Binding parameters: SELECT * FROM users WHERE lastname >= (SELECT MIN(lastname) FROM users WHERE lastname > 'Dare\"') ORDER BY lastname ASC LIMIT 1

Seems to me that both should work or both should fail

Options: ReplyQuote


Subject
Views
Written By
Posted
1187
March 28, 2018 12:24PM
616
March 28, 2018 01:07PM
751
March 28, 2018 05:13PM
753
March 28, 2018 08:35PM
757
March 29, 2018 06:05AM
641
March 29, 2018 06:34AM
Re: Beginning and end of table
734
March 29, 2018 07:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.