| | |
Pagination Without Limit in Query
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2009
Posts: 103
Reputation:
Solved Threads: 2
is there any way to paginate the page without using limit in Query..!!
Actually i m working on predefined stored procedures. and i m not allowed to make in changes that..!!! and that does contain limit function at all..!!!!
any suggestions how should i do it.?
thanks in advance
Actually i m working on predefined stored procedures. and i m not allowed to make in changes that..!!! and that does contain limit function at all..!!!!
any suggestions how should i do it.?
thanks in advance
Last edited by sam023; 25 Days Ago at 5:40 am.
0
#2 25 Days Ago
Surely pagination without a limit would not be pagination...
The limit is there to specify how many results are retreived, without it all records would be pulled on each query.
The limit is there to specify how many results are retreived, without it all records would be pulled on each query.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
•
•
Join Date: Sep 2009
Posts: 525
Reputation:
Solved Threads: 61
0
#3 25 Days Ago
look around for using SQL_CALC_FOUND_ROWS in query, it may help you
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
•
•
Join Date: Sep 2009
Posts: 525
Reputation:
Solved Threads: 61
0
#5 25 Days Ago
so whats the need to do this, anyways you fetching the entire data and storing it to some array, it will consume lots and lots of memory.Better to use the MySQL query with the limit.
You can cache the result coming each time for some predefined time duration.It will help to make the results faster.
You can cache the result coming each time for some predefined time duration.It will help to make the results faster.
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
•
•
Join Date: Sep 2009
Posts: 525
Reputation:
Solved Threads: 61
0
#7 25 Days Ago
why you cant use the limit in query, just post your code and the problem it creates when used the limit.
I am sure there is some misconception about some patch of code
I am sure there is some misconception about some patch of code
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
•
•
Join Date: Jun 2009
Posts: 103
Reputation:
Solved Threads: 2
0
#8 24 Days Ago
mysql Syntax (Toggle Plain Text)
DELIMITER $$ DROP PROCEDURE IF EXISTS `dd`.`view_ratecard`$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `view_ratecard`(id_tariffplan INT(11),country_code CHAR(30)) BEGIN if(country_code="") THEN SELECT dialprefix,destination,rateinitial,initblock,billingblock,id_trunk,grace,idtariffplan,id FROM cc_ratecard WHERE idtariffplan=id_tariffplan AND rate_version='0' ORDER BY destination asc; ELSE SELECT dialprefix,destination,rateinitial,initblock,billingblock,id_trunk,grace,idtariffplan,id FROM cc_ratecard WHERE idtariffplan=id_tariffplan AND rate_version='0' AND dialprefix LIKE CONCAT(country_code,'%') ORDER BY destination asc; END if ; END$$ DELIMITER ;
Last edited by sam023; 24 Days Ago at 1:10 am.
•
•
Join Date: Sep 2009
Posts: 525
Reputation:
Solved Threads: 61
0
#9 24 Days Ago
It is always nice to have one SP against such queries which get fired often.Ok, they told you to implement the same SP as it is and you are worried about the pagination.You can proceed the way you want like gettign everything in entire array, if you are sure that, the rows returned by that SP are not much.
Or else you can modify the same simple SP to accept the start index and the page_size for making pagination easier.
Or else you can modify the same simple SP to accept the start index and the page_size for making pagination easier.
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
![]() |
Similar Threads
- How to use large pagination in a limited area (PHP)
- Clean Previous Next Script for MySQL results (PHP)
- pagination not displaying results (PHP)
- About LIMIT in mysql (PHP)
- search results question (PHP)
- pagination problem (PHP)
- pagination of mysql query results (PHP)
- PHP Search pagination problem (PHP)
Other Threads in the PHP Forum
- Previous Thread: how to use a external javascript file (like external CSS) in php
- Next Thread: PHP Recursion
| Thread Tools | Search this Thread |
301 apache api array autosuggest beginner binary broken cakephp checkbox class cms code compression cron curl data database date display dropdownlist dynamic echo email eregi error execution file files folder form forms function functions google href htaccess html httppost if...loop image include insert ip javascript joomla jquery key library limit link links login mail md5 menu mlm multiple mysql mysql_real_escape_string oop paypal pdf pdfdownload php phpvotingscript problem query radio random recursion remote screen script search searchbox server session sessions sms sorting source space sql syntax system table tutorial update upload url validator variable video volume votedown web website youtube zend





