RE: [PHP] Paging and permissions

2011-02-09 Thread Arno Kuhl
On Tue, 2011-02-08 at 14:36 +0200, Arno Kuhl wrote: I'm hoping some clever php gurus have been here before and are willing to share some ideas. I have a site where articles are assigned to categories in containers. An article can be assigned to only one

RE: [PHP] Paging and permissions

2011-02-09 Thread Ashley Sheridan
On Wed, 2011-02-09 at 13:03 +0200, Arno Kuhl wrote: On Tue, 2011-02-08 at 14:36 +0200, Arno Kuhl wrote: I'm hoping some clever php gurus have been here before and are willing to share some ideas. I have a site where articles are assigned to categories in

RE: [PHP] Paging and permissions

2011-02-09 Thread Arno Kuhl
Instead of serializing the articles, you only need their IDs. Using $sql .= ' where id in (' . implode(',', $ids) . ')'; you can load the data for a page of results in a single query. Storing the IDs is much cheaper than the articles. If the permissions are fairly static (i.e. access for

RE: [PHP] Paging and permissions

2011-02-09 Thread Ashley Sheridan
On Wed, 2011-02-09 at 13:27 +0200, Arno Kuhl wrote: Instead of serializing the articles, you only need their IDs. Using $sql .= ' where id in (' . implode(',', $ids) . ')'; you can load the data for a page of results in a single query. Storing the IDs is much cheaper than the

[PHP] Paging and permissions

2011-02-08 Thread Arno Kuhl
I'm hoping some clever php gurus have been here before and are willing to share some ideas. I have a site where articles are assigned to categories in containers. An article can be assigned to only one category per container, but one or more containers. Access permissions can be set per article,

Re: [PHP] Paging and permissions

2011-02-08 Thread David Hutto
On Tue, Feb 8, 2011 at 7:36 AM, Arno Kuhl ak...@telkomsa.net wrote: I'm hoping some clever php gurus have been here before and are willing to share some ideas. I have a site where articles are assigned to categories in containers. An article can be assigned to only one category per container,

Re: [PHP] Paging and permissions

2011-02-08 Thread Ashley Sheridan
On Tue, 2011-02-08 at 14:36 +0200, Arno Kuhl wrote: I'm hoping some clever php gurus have been here before and are willing to share some ideas. I have a site where articles are assigned to categories in containers. An article can be assigned to only one category per container, but one or

Re: [PHP] Paging and permissions

2011-02-08 Thread Tolas Anon
On Tue, Feb 8, 2011 at 1:36 PM, Arno Kuhl ak...@telkomsa.net wrote: I'm hoping some clever php gurus have been here before and are willing to share some ideas. I have a site where articles are assigned to categories in containers. An article can be assigned to only one category per

Re: [PHP] Paging and permissions

2011-02-08 Thread David Harkness
On Tue, Feb 8, 2011 at 4:36 AM, Arno Kuhl ak...@telkomsa.net wrote: But it might be an option if done once at the start of each search or list request, and then use that temporary modified result set for subsequent requests on the same set. Instead of serializing the articles, you only need

[PHP] Paging script

2009-09-30 Thread Angelo Zanetti
Hi All, I am looking for a paging script, not the normal type but slightly different. It must show as follows: 1 2 3 ... 12 Then: 1 ... 678 ... 12 And 1 ... 10 11 12 I have googled and not really found much and don't really want to reinvent the wheel. I am sure I can write my own but

RE: [PHP] Paging script

2009-09-30 Thread Mert Oztekin
...@elemental.co.za] Sent: Wednesday, September 30, 2009 1:21 PM To: php-general@lists.php.net Subject: [PHP] Paging script Hi All, I am looking for a paging script, not the normal type but slightly different. It must show as follows: 1 2 3 ... 12 Then: 1 ... 678 ... 12 And 1 ... 10 11 12 I have

RE: [PHP] Paging script

2009-09-30 Thread Angelo Zanetti
-Original Message- From: Mert Oztekin [mailto:mozte...@anadolusigorta.com.tr] Sent: 30 September 2009 12:40 PM To: 'Angelo Zanetti'; php-general@lists.php.net Subject: RE: [PHP] Paging script Sorry but I dont understand what you mean. Can you be more specific? {1} 2 3 ... 12

RE: [PHP] Paging script

2009-09-30 Thread Ashley Sheridan
On Wed, 2009-09-30 at 12:59 +0200, Angelo Zanetti wrote: -Original Message- From: Mert Oztekin [mailto:mozte...@anadolusigorta.com.tr] Sent: 30 September 2009 12:40 PM To: 'Angelo Zanetti'; php-general@lists.php.net Subject: RE: [PHP] Paging script Sorry but I dont understand

Re: [PHP] Paging script

2009-09-30 Thread Ruben Crespo
Hi all, Maybe it is not just what you need but could be helpfull. Here you have the code: //---paginator.php ?php function paginator ($current, $total, $per_page, $link, $limit) { if ($current ==

RE: [PHP] Paging script

2009-09-30 Thread Angelo Zanetti
_ From: Ruben Crespo [mailto:rumails...@gmail.com] Sent: 30 September 2009 01:23 PM To: Angelo Zanetti Cc: php-general@lists.php.net Subject: Re: [PHP] Paging script Hi all, Maybe it is not just what you need but could be helpfull. Here you have the code

RE: [PHP] Paging script

2009-09-30 Thread Mert Oztekin
Zanetti [mailto:ang...@elemental.co.za] Sent: Wednesday, September 30, 2009 1:59 PM To: Mert Oztekin; php-general@lists.php.net Subject: RE: [PHP] Paging script -Original Message- From: Mert Oztekin [mailto:mozte...@anadolusigorta.com.tr] Sent: 30 September 2009 12:40 PM To: 'Angelo

Re: [PHP] Paging script

2009-09-30 Thread Ruben Crespo
@lists.php.net Subject: Re: [PHP] Paging script Hi all, Maybe it is not just what you need but could be helpfull. Here you have the code: //---paginator.php-- -- ?php function paginator ($current, $total

Re: [PHP] paging

2009-02-10 Thread tedd
At 3:26 AM + 2/10/09, Jim Douglas wrote: Does anyone have a link to any examples of paging? Jim: Sure. http://webbytedd.com/bbb/paging/ -- the code is there different examples here: http://webbytedd.com/ccc/pagination Cheers, tedd -- --- http://sperling.com

RES: [PHP] paging

2009-02-10 Thread Jônatas Zechim
MySql or MsSql or other dB? -Mensagem original- De: tedd [mailto:tedd.sperl...@gmail.com] Enviada em: terça-feira, 10 de fevereiro de 2009 11:26 Para: Jim Douglas; php-general@lists.php.net Assunto: Re: [PHP] paging At 3:26 AM + 2/10/09, Jim Douglas wrote: Does anyone have a link

Re: [PHP] paging

2009-02-10 Thread Richard Heyes
... Hi, Too lazy to actually read the email (tsk), but there's rather a nice paging library in PEAR that may help. Imaginitively called Pager. -- Richard Heyes HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari: http://www.rgraph.org (Updated January 31st) -- PHP General Mailing

RE: RES: [PHP] paging

2009-02-10 Thread Jim Douglas
MySQL From: zechim@gmail.com To: tedd.sperl...@gmail.com; jd...@hotmail.com; php-general@lists.php.net Subject: RES: [PHP] paging Date: Tue, 10 Feb 2009 11:33:42 -0200 MySql or MsSql or other dB? -Mensagem original- De: tedd [mailto:tedd.sperl...@gmail.com] Enviada em

RE: [PHP] paging

2009-02-10 Thread Jim Douglas
a CSS that has left, right, header, footer and a content pane. After I click on the drop down it outputs to the content pane just fine. Thanks, Jim Date: Tue, 10 Feb 2009 08:26:23 -0500 To: jd...@hotmail.com; php-general@lists.php.net From: tedd.sperl...@gmail.com Subject: Re: [PHP

[PHP] paging

2009-02-09 Thread Jim Douglas
Does anyone have a link to any examples of paging? I have this example up and running, http://www.w3schools.com/php/php_ajax_database.asp I have paging working as below, my problem is when I add a CSS style sheet I now have 4 panes. How can I direct the paging results to the content

Re: [PHP] paging

2009-02-09 Thread Kevin Waterson
On Tue, 2009-02-10 at 03:26 +, Jim Douglas wrote: http://phpro.org/tutorials/Pagination-with-PHP-and-PDO.html Does anyone have a link to any examples of paging? Kevin http://phpro.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] paging at which level

2008-10-19 Thread Richard Heyes
I'm still a little wet behind the ears, nih?! Not Invented Here -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] paging at which level

2008-10-19 Thread Richard Heyes
I've not used a library to achieve paging NIH syndrome? ;-) -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] paging at which level

2008-10-19 Thread Ashley Sheridan
On Sun, 2008-10-19 at 10:23 +0100, Richard Heyes wrote: I've not used a library to achieve paging NIH syndrome? ;-) I'm still a little wet behind the ears, nih?! Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] paging at which level

2008-10-18 Thread Alain Roger
Hi, i would like to know what is the best approach for paging ? usually i use PEAR and page thanks their table library, but to avoid high transfer of data from DB to PHP page it is better to do the paging at database level. I would like to know what is your point of view on this topic and what do

Re: [PHP] paging at which level

2008-10-18 Thread Richard Heyes
usually i use PEAR and page thanks their table library Table library? Y'know there's a dedicated paging library in PEAR, imaginitively called Pager. , but to avoid high transfer of data from DB to PHP page it is better to do the paging at database level. I would like to know what is your

Re: [PHP] paging at which level

2008-10-18 Thread Robert Cummings
On Sat, 2008-10-18 at 12:54 +0200, Alain Roger wrote: Hi, i would like to know what is the best approach for paging ? usually i use PEAR and page thanks their table library, but to avoid high transfer of data from DB to PHP page it is better to do the paging at database level. If you want

Re: [PHP] paging at which level

2008-10-18 Thread Ashley Sheridan
On Sat, 2008-10-18 at 12:54 +0200, Alain Roger wrote: Hi, i would like to know what is the best approach for paging ? usually i use PEAR and page thanks their table library, but to avoid high transfer of data from DB to PHP page it is better to do the paging at database level. I would like

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-25 Thread Robert Cummings
On Sun, 2006-12-24 at 11:22 -0500, tedd wrote: Again, in my opinion, that's fuzzy thinking. Sure, Yeti may be in the monster sub-set, but how much monster it is as compared to Lockness? You need a means, a yardstick, to compare the two with each other. Like, is Lockness bigger than

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-25 Thread Martin Alterisio
2006/12/25, Robert Cummings [EMAIL PROTECTED]: WRONG! See Martin Alterisio's post for the same thread. You must not have understood the OP's requirements. xD I was starting to think my mails weren't getting through the list, maybe its nothing else than only a bigger delay than the usual.

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-24 Thread Robert Cummings
On Sat, 2006-12-23 at 12:06 -0500, tedd wrote: At 11:24 AM -0500 12/23/06, Robert Cummings wrote: On Sat, 2006-12-23 at 11:05 -0500, tedd wrote: In my opinion, wrong thinking. You ask how many records appear before and after a search string result. That's like asking What's the

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-24 Thread Martin Alterisio
To solve a problem like yours I ussualy do the following: First you need to use a deterministic order criteria when displaying the results, this means that according to the order columns you provide, MySQL will not have to decide how to order two rows that have the same values for this columns.

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-24 Thread tedd
Again, in my opinion, that's fuzzy thinking. Sure, Yeti may be in the monster sub-set, but how much monster it is as compared to Lockness? You need a means, a yardstick, to compare the two with each other. Like, is Lockness bigger than the Yeti while monster-mouse is smaller, or what?

[PHP] Clarification: Jump to a record/PHP paging...

2006-12-23 Thread T.J. Mahaffey
I see now that I did not explain myself adequately. I think jump to record was the wrong way to put it. So, here goes. I already have excellent paging functionality working well, based on a nice tutorial at PHPFreaks. My problem is that when a user performs a search, I need to display the

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-23 Thread tedd
At 9:03 AM -0600 12/23/06, T.J. Mahaffey wrote: I see now that I did not explain myself adequately. I think jump to record was the wrong way to put it. So, here goes. I already have excellent paging functionality working well, based on a nice tutorial at PHPFreaks. My problem is that when a

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-23 Thread T.J. Mahaffey
I agree, tedd. And your points about what makes sense are taken. That being said, the end point of all this is for a search to simply act like a real person turning the pages of a phone book. All I need to do is take the user to a desired point within the records in the database. This is by

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-23 Thread Robert Cummings
On Sat, 2006-12-23 at 11:05 -0500, tedd wrote: In my opinion, wrong thinking. You ask how many records appear before and after a search string result. That's like asking What's the difference between an orange? -- it doesn't make sense. It makes perfect sense. He has an order to his

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-23 Thread tedd
At 11:24 AM -0500 12/23/06, Robert Cummings wrote: On Sat, 2006-12-23 at 11:05 -0500, tedd wrote: In my opinion, wrong thinking. You ask how many records appear before and after a search string result. That's like asking What's the difference between an orange? -- it doesn't make sense.

Re: [PHP] Clarification: Jump to a record/PHP paging...

2006-12-23 Thread Sumeet
T.J. Mahaffey wrote: My problem is that when a user performs a search, I need to display the page on which their search string is found, but still display ALL records within the paging of the entire database. I've since discovered the core of what I need to do: i would suggest u run the

[PHP] Jump to a record when searching MYSQL with PHP Paging?

2006-12-22 Thread T.J. Mahaffey
I am working on a PHP/MySQL application where I am displaying and paging records from a MySQL database. The search functionality needs to be a bit different than I'm used to. Instead of returning only the records matching the query, it needs to return ALL records, BUT take the user to the

Re: [PHP] Jump to a record when searching MYSQL with PHP Paging?

2006-12-22 Thread tg-php
I would guess this would depend highly on how you're displaying the data. Let's set up a scenario: 1. Full results come out to say, 100 records. 2. Searched item is #53 in the result set. Your choices for displaying the data could be one of the following: * One big web page, jumping to the

Re: [PHP] Jump to a record when searching MYSQL with PHP Paging?

2006-12-22 Thread Børge Holen
On Friday 22 December 2006 20:11, T.J. Mahaffey wrote: I am working on a PHP/MySQL application where I am displaying and paging records from a MySQL database. The search functionality needs to be a bit different than I'm used to. Instead of returning only the records matching the query, it

Re: [PHP] Jump to a record when searching MYSQL with PHP Paging?

2006-12-22 Thread Børge Holen
On Friday 22 December 2006 20:11, T.J. Mahaffey wrote: I am working on a PHP/MySQL application where I am displaying and paging records from a MySQL database. The search functionality needs to be a bit different than I'm used to. Instead of returning only the records matching the query, it

[PHP] Paging Help

2006-06-20 Thread Rodrigo de Oliveira Costa
I have the following problem, I need to make a paging system to show results from search on a Mysql database. I found a class that should do the job but couldn't figure it out how to use it. Does anybody has an Idea of hos to do this? I thank in advance for any help you guys can provide me.

Re: [PHP] Paging Help

2006-06-20 Thread Juanjo Pascual
?php // Num of records each time $NUM_RECORDS = 10; if ($_GET[pag] == ) { $ini = 0; $pag = 1; } else { $ini = ($pag - 1) * $NUM_RECORDS; } // Query to show $query_rsData = SELECT * FROM table LIMIT . $ini . , . $NUM_RECORDS; $rsData = mysql_query($query_rsData, $DB_CONECTION); //

Re: [PHP] Paging Help

2006-06-20 Thread Andrei
Juanjo Pascual wrote: ?php // Num of records each time $NUM_RECORDS = 10; if ($_GET[pag] == ) { $ini = 0; $pag = 1; } else { $ini = ($pag - 1) * $NUM_RECORDS; } // Query to show $query_rsData = SELECT * FROM table LIMIT . $ini . , . $NUM_RECORDS; $rsData =

Re: [PHP] Paging Help

2006-06-20 Thread Adam Zey
Andrei wrote: Since you query all enregs from table why not query all first and the do mysql_data_seek on result? // Query to show $query_rsData = SELECT * FROM {table} ORDER BY {Whatever field}; $rsData = mysql_query($query_rsData, $DB_CONECTION); $num_total_records = mysql_num_rows(

[PHP] paging results in large resultsets: mysql vs postgresql?

2006-06-15 Thread D. Dante Lorenso
All, I just discovered this neat little gem in MySQL which makes it easy to page large result sets: * SELECT SQL_CALC_FOUND_ROWS * FROM table LIMIT 10, 10 * SELECT FOUND_ROWS() The neat thing is that SQL_CALC_FOUND_ROWS will cause MySQL to tally up all the rows that WOULD

Re: [PHP] paging results in large resultsets: mysql vs postgresql?

2006-06-15 Thread tedd
At 11:11 AM -0500 6/15/06, D. Dante Lorenso wrote: I can't seem to find the equivalent of it in PostgreSQL! The only options I see are: 1. TWO queries. The first query will perform a SELECT COUNT(*) ...; and the second query performs the actualy SELECT ... LIMIT x OFFSET y; -snip-

Re: [PHP] paging results in large resultsets: mysql vs postgresql?

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 11:11 am, D. Dante Lorenso wrote: I just discovered this neat little gem in MySQL which makes it easy to page large result sets: * SELECT SQL_CALC_FOUND_ROWS * * SELECT FOUND_ROWS() I can't seem to find the equivalent of it in PostgreSQL! The only options I

Re: [PHP] paging results in large resultsets: mysql vs postgresql?

2006-06-15 Thread D. Dante Lorenso
Richard Lynch wrote: 3. use the built-in cursor of PostgreSQL which pre-dates MySQL LIMIT and OFFSET clauses, which are non-standard hacks Rasmus introduced back in the day. Care to elaborate? Cast into context of PDO if you can...? Dante -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] paging results in large resultsets: mysql vs postgresql?

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 7:15 pm, D. Dante Lorenso wrote: Richard Lynch wrote: 3. use the built-in cursor of PostgreSQL which pre-dates MySQL LIMIT and OFFSET clauses, which are non-standard hacks Rasmus introduced back in the day. Care to elaborate? Cast into context of PDO if you can...?

Re: [PHP] paging methodology

2004-05-05 Thread Paul Chvostek
On Tue, May 04, 2004 at 02:37:50PM -0700, Chris W. Parker wrote: I don't follow what $_GET record count from initial query performed above; is for, but that's the basic methodology. well that just meant that after the initial count of records is found it will be retrieved from the

Re: [PHP] paging methodology

2004-05-05 Thread Brian Muldown
Chris W. Parker wrote: ok. this is what i was already doing in my previous app but i was just looking to see if it could be streamlined some how. You could perform the full (without LIMIT) query once, Cache the results array (using PEAR Cache) and move back-and-forth through this Cached array.

Re: [PHP] paging methodology

2004-05-05 Thread John W. Holmes
- Original Message - From: Paul Chvostek [EMAIL PROTECTED] On Tue, May 04, 2004 at 02:37:50PM -0700, Chris W. Parker wrote: well that just meant that after the initial count of records is found it will be retrieved from the querystring instead of through a select statement

RE: [PHP] paging methodology

2004-05-05 Thread Chris W. Parker
John W. Holmes mailto:[EMAIL PROTECTED] on Wednesday, May 05, 2004 7:32 AM said: Personal preference here, I guess, but I don't care for searches that don't tell you how many records were matched (or how many pages you'll have). I think the additional query is well worth it. The number of

RE: [PHP] paging methodology

2004-05-05 Thread Chris
rows. Chris -Original Message- From: Chris W. Parker [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 05, 2004 9:33 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] paging methodology John W. Holmes mailto:[EMAIL PROTECTED] on Wednesday, May 05, 2004 7:32 AM said: Personal preference here

RE: [PHP] paging methodology

2004-05-05 Thread Chris W. Parker
Chris mailto:[EMAIL PROTECTED] on Wednesday, May 05, 2004 10:56 AM said: If you're using MySQL 4+ you could use the SQL_CALC_FOUND_ROWS flag in the select statement. It causes the query to count the number of rows it *would have* returned if there had been no limit clause. do you know

RE: [PHP] paging methodology

2004-05-05 Thread Chris
-Original Message- From: Chris W. Parker [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 05, 2004 11:07 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] paging methodology Chris mailto:[EMAIL PROTECTED] on Wednesday, May 05, 2004 10:56 AM said: If you're using MySQL 4+ you could use

RE: [PHP] paging methodology

2004-05-05 Thread Chris W. Parker
Chris mailto:[EMAIL PROTECTED] on Wednesday, May 05, 2004 11:24 AM said: The documentation for the FOUND_ROWS() function is here: http://dev.mysql.com/doc/mysql/en/Information_functions.html ahh... i see. so it essentially allows you to execute one query while achieving the same two query

RE: [PHP] paging methodology

2004-05-05 Thread Brad Pauly
On Wed, 2004-05-05 at 12:23, Chris wrote: It's certainly faster than SELECT COUNT(*) FROM sometable WHERE . . .; It might not be faster than SELECT COUNT(*) FROM sometable, as that is designed to run very quickly. I believe it will also depend on the type of table you are using. SELECT

Re: [PHP] paging methodology

2004-05-05 Thread John W. Holmes
From: Chris W. Parker [EMAIL PROTECTED] do you know if that's any faster than doing a SELECT COUNT(*) FROM table WHERE ... ? I did a couple (unscientific) tests and there doesn't seem to be much of a difference. I'd use the COUNT(*) method just because it's more portable, though. ---John

Re: [PHP] paging methodology

2004-05-05 Thread John W. Holmes
From: Chris W. Parker [EMAIL PROTECTED] on a related note... how does BENCHMARK() work? i don't understand their explanation. the reason i ask is because i'd like to test our the efficiency of what you are suggesting compared to what i am currently doing. SELECT BENCHMARK(500, 'SELECT *

RE: [PHP] paging methodology

2004-05-04 Thread Chris W. Parker
John W. Holmes mailto:[EMAIL PROTECTED] on Tuesday, May 04, 2004 1:30 PM said: I don't follow what $_GET record count from initial query performed above; is for, but that's the basic methodology. well that just meant that after the initial count of records is found it will be retrieved

[PHP] Paging / Navigation Help

2002-12-12 Thread William Martell
Hello ALL. Can anyone tell me why the number of rows is always 1 and count is the total number of records in my database. Thanks in Advance, William [snip] HTML HEAD TITLE/TITLE /HEAD BODY ?php $db = mysql_connect(localhost, root); mysql_select_db(dallas, $db); $result =

Re: [PHP] Paging / Navigation Help

2002-12-12 Thread 1LT John W. Holmes
PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, December 12, 2002 2:56 PM Subject: [PHP] Paging / Navigation Help Hello ALL. Can anyone tell me why the number of rows is always 1 and count is the total number of records in my database

[PHP] paging through results of mysql query

2002-12-05 Thread Larry Brown
I know I'm trying to re-invent the wheel, but it is because I don't know how they do it. I set up a script to pull a ruleset from mysql and then loop through each row in the set. I then check each row as it loops until I get to the row number I want and start echoing rows. I create the row

RE: [PHP] paging through results of mysql query

2002-12-05 Thread John W. Holmes
I know I'm trying to re-invent the wheel, but it is because I don't know how they do it. I set up a script to pull a ruleset from mysql and then loop through each row in the set. I then check each row as it loops until I get to the row number I want and start echoing rows. I create the

RE: [PHP] paging through results of mysql query

2002-12-05 Thread Larry Brown
: [PHP] paging through results of mysql query I know I'm trying to re-invent the wheel, but it is because I don't know how they do it. I set up a script to pull a ruleset from mysql and then loop through each row in the set. I then check each row as it loops until I get to the row number I want

[PHP] Paging HOWTO for PHP n' MYSQL

2002-10-02 Thread Francisco Vaucher
Hi people, i've been searching for a while in google and vivisimo for docs that treats paging techniques for php and mysql. And so far i seek nothing. I always get stuck with empty documents (if you know what I mean). Can U give me a hand with this. If you already have a doc of this nature, or

Re: [PHP] Paging HOWTO for PHP n' MYSQL

2002-10-02 Thread Rasmus Lerdorf
Just pass the current position from one page to the next and use a LIMIT start,num clause. -Rasmus On Wed, 2 Oct 2002, Francisco Vaucher wrote: Hi people, i've been searching for a while in google and vivisimo for docs that treats paging techniques for php and mysql. And so far i seek

[PHP] paging MySQL layout

2002-05-23 Thread Juan Pablo Aqueveque
Hi everyone. I know, this is a off topic. My always nice boss wants to put a series of documents in our web site. I want to save myself I work and I want to put them in a DB. Somebody can help me with the layout of my DB?. I have some idea like this. create table documents ( id in(11) not

RE: [PHP] paging MySQL layout

2002-05-23 Thread Vail, Warren
(877) 774-9891 215 Fremont 02-658 -Original Message- From: Juan Pablo Aqueveque [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 9:43 AM To: [EMAIL PROTECTED] Subject: [PHP] paging MySQL layout Hi everyone. I know, this is a off topic. My always nice boss wants to put a series

[PHP] Paging using arrays Question

2002-01-11 Thread Lerp
Hi there, I have a db with only one table in it called CONSULTANT. I'm using sqlServer and would like to do record paging, say 5 at a time. I'm aware that sqlServer doesn't support the LIMIT statement so I've decided to do it using arrays. So I've written the appropriate query statement, managed

[PHP] Paging through MySQL results in PHP

2002-01-04 Thread Nelson Goforth
I have an application that returns a set of results from a MySQL query. Let's say I have 100 results from the query, but only want to show 25 per HTML page. The MySQL query is driven by a 'Search' page that creates an array $keywords - which can be of any size. I then loop through the

[PHP] Paging through MySQL results

2001-10-05 Thread wjt
I am a bit new to PHP -- normally use ASP (no booing, please) -- and trying to find an elegant solution to paging x number of records at a time through a result set returned to a php page from MySQL. Any ideas? TIA, Bill -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Paging through MySQL results

2001-10-05 Thread Andrey Hristov
select * from some_table Limit 10,30; syntaxis limit start,offset Andrey Hristov IcyGEN Corporation Building Solutions On Friday 05 October 2001 18:52, you wrote: I am a bit new to PHP -- normally use ASP (no booing, please) -- and trying to find an elegant solution to paging x number of

Re: [PHP] Paging through MySQL results

2001-10-05 Thread Joel Ricker
- Original Message - From: Andrey Hristov [EMAIL PROTECTED] select * from some_table Limit 10,30; Something to point out, in some of the older versions of MySQL, Offset starts counting at 0, while in the newer versions, it starts counting at 1. You'll want to check the documentation

Re: [PHP] Paging through MySQL results

2001-10-05 Thread wjt
Question: Does the pagination method using mysql_data_seek method pull in the entire result set, only to be used to display x number of rows? Joel Ricker [EMAIL PROTECTED] wrote in message 00b501c14db9$84e4a4f0$04a3d6d1@joeltklrijxxms">news:00b501c14db9$84e4a4f0$04a3d6d1@joeltklrijxxms...

Re: [PHP] Paging a Recordset

2001-03-15 Thread Web master
you can use 'limit x,y' in MySql. James Crowley wrote: Hi, I want to spread the results of a recordset over a number of pages. In ASP, I would have opened a connection with a client-side cursor... but with PHP (using it's ODBC functions), it only seems to be able to execute an SQL

Re: [PHP] Paging a Recordset

2001-03-15 Thread Manuel Lemos
Hello, James Crowley wrote: Hi, I want to spread the results of a recordset over a number of pages. In ASP, I would have opened a connection with a client-side cursor... but with PHP (using it's ODBC functions), it only seems to be able to execute an SQL statement, and return all

[PHP] Paging results

2001-02-14 Thread Randy Johnson
Can somebody give me a url of an example or an example of how to page results so they can be view by clicking page 1 page 2 or back and next? results obtained from mysql database. Thanks Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: [PHP] Paging results

2001-02-14 Thread David Robley
On Thu, 15 Feb 2001 07:12, Randy Johnson wrote: Can somebody give me a url of an example or an example of how to page results so they can be view by clicking page 1 page 2 or back and next? results obtained from mysql database. Thanks Randy http://px.sklar.com/code.html?code_id=77

Re: [PHP] Paging results

2001-02-14 Thread Ankur Verma
Randy Johnson" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 15, 2001 2:12 AM Subject: [PHP] Paging results Can somebody give me a url of an example or an example of how to page results so they can be view by clicking page 1 page 2 or back and next? results obtained