Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-19 Thread Patrik Hasibuan
Hi Arvid, thank you very much for your remark. It is useful for me. === On Fri, 14 Sep 2007 12:01:40 +0300 Arvids Godjuks [EMAIL PROTECTED] wrote: Don't use SQL_CALC_FOUND ROWS on simple queries, when you have to run a simple query on one or two (with join) tables with a simple WHERE.

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-19 Thread Patrik Hasibuan
Dear Brian, My problem is solved. thank you very much for your help. === On Wed, 12 Sep 2007 14:04:11 -0400 brian [EMAIL PROTECTED] wrote: Patrik Hasibuan wrote: Dear my friends... I am trying to display the content of a table. Each page must content only 5 records maximum. Each page

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-19 Thread Patrik Hasibuan
Dear mike, your thread solved my problem. I really appreciate your help. Thank you very much. On Thu, 13 Sep 2007 14:49:29 -0700 mike [EMAIL PROTECTED] wrote: warning: this is VERY UGLY CODE. i wrote it 3-4 years ago now i think and it just keeps working. you call it this way: #

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-14 Thread Arvids Godjuks
Don't use SQL_CALC_FOUND ROWS on simple queries, when you have to run a simple query on one or two (with join) tables with a simple WHERE. Especialy if tables are big. I found out that single SELECT COUNT(id) FROM table is far more faster when query has simple WHERE conditions. I use

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-14 Thread mike
except i think innodb does not have a full row count stored. anyway the design was meant for a simple one function call. it's worked great for small and data loads. On 9/14/07, Arvids Godjuks [EMAIL PROTECTED] wrote: Don't use SQL_CALC_FOUND ROWS on simple queries, when you have to run a

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-14 Thread Zoltán Németh
2007. 09. 14, péntek keltezéssel 10.50-kor mike ezt írta: except i think innodb does not have a full row count stored. of course not, but SQL_CALC_FOUND_ROWS does not use that. it is working like it selects the rows and counts them. and in the case of complex queries (where you use more than one

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-13 Thread Patrik Hasibuan
Hi Mike, I am intrested for the solution you gave me. But I am confused of the way in implementing select FOUND_ROWS(). I wrote another very simple codes as the first step for understanding this threat: ?php $konek=mysql_connect(127.0.0.1,root,mypassword); if ($konek){ for

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-13 Thread mike
warning: this is VERY UGLY CODE. i wrote it 3-4 years ago now i think and it just keeps working. you call it this way: # pagination. if(isset($_GET['pg'])) { $page = intval($_GET['pg']); } else { $page = 1; } $page = sprintf(%02d,$page); $query = Array( 'query' =

[PHP] my paging task with PHP does not work. It uses cookie.

2007-09-12 Thread Patrik Hasibuan
Dear my friends... I am trying to display the content of a table. Each page must content only 5 records maximum. Each page has Previous and Next buttons (made from anchor). I dump the primary of the working table and keep it in a cookie. So than the paging task work with the index of cookie

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-12 Thread brian
Patrik Hasibuan wrote: Dear my friends... I am trying to display the content of a table. Each page must content only 5 records maximum. Each page has Previous and Next buttons (made from anchor). I dump the primary of the working table and keep it in a cookie. So than the paging task work with

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-12 Thread mike
On 9/12/07, Patrik Hasibuan [EMAIL PROTECTED] wrote: Dear my friends... I am trying to display the content of a table. Each page must content only 5 records maximum. Each page has Previous and Next buttons (made from anchor). I dump the primary of the working table and keep it in a