Re: Beginning and end of table
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
Subject
Views
Written By
Posted
1383
March 28, 2018 12:24PM
720
March 28, 2018 01:07PM
915
March 28, 2018 05:13PM
845
March 28, 2018 08:35PM
858
March 29, 2018 06:05AM
744
March 29, 2018 06:34AM
Re: Beginning and end of table
842
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.