Link to home
Start Free TrialLog in
Avatar of narmi2
narmi2

asked on

PDO and pagination

Dear Experts,

I have a PHP script using PDO to execute a MySQL stored procedure which uses the LIMIT command for pagination purposes.

The problem is that because of the LIMIT command, it only gets 10 records at a time.  But for my pagination to work, I need to have a full record count.

How can this be done?
ASKER CERTIFIED SOLUTION
Avatar of TiberiuGal
TiberiuGal
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of narmi2
narmi2

ASKER

Can I not dynamically construct the sql query using PDO?  So the first time it is run it does not include the LIMIT statement, but in the second run, it includes the LIMIT statement?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial