RE: [PHP] Next and Preview Row

2002-02-22 Thread Darren Gamble
EMAIL PROTECTED] Subject: Re: [PHP] Next and Preview Row Yes, but how to get ONLY the 3 records you need ? Because often in an application, you don't care about the other records. In this case AFAIK, there is no other solution than issuing at least two queries : SELECT * FROM table WHERE field<=&

Re: [PHP] Next and Preview Row

2002-02-22 Thread Fournier Jocelyn [Presence-PC]
;Mark Lo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 22, 2002 9:17 PM Subject: Re: [PHP] Next and Preview Row > > It seems worst to me because in your case mysql has to retrieve all the > > rows. If it's a table with

Re: [PHP] Next and Preview Row

2002-02-22 Thread Fournier Jocelyn [Presence-PC]
ot;Raymond Gubala" <[EMAIL PROTECTED]>; "Mark Lo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 22, 2002 4:45 PM Subject: Re: [PHP] Next and Preview Row > > The solution I have been using is to do three queries simila

Re: [PHP] Next and Preview Row

2002-02-22 Thread Chris Boget
> It seems worst to me because in your case mysql has to retrieve all the > rows. If it's a table with 1 million records or more, this should hurt ;) As I said, it was pseudo code. Now, imagine that you were just getting the records for a particular user? a particular application? Where there w

Re: [PHP] Next and Preview Row

2002-02-22 Thread Chris Boget
> The solution I have been using is to do three queries similar to the below > SELECT * FROM table WHERE field='ID00025' > SELECT * FROM table WHERE field<'ID00025' ORDER BY field DESC LIMIT 0,1 > SELECT * FROM table WHERE field>'ID00025' ORDER BY field ASC LIMIT 0,1 > If you whish more row return

Re: [PHP] Next and Preview Row

2002-02-22 Thread Raymond Gubala
The solution I have been using is to do three queries similar to the below SELECT * FROM table WHERE field='ID00025' SELECT * FROM table WHERE field<'ID00025' ORDER BY field DESC LIMIT 0,1 SELECT * FROM table WHERE field>'ID00025' ORDER BY field ASC LIMIT 0,1 If you whish more row returned cha

Re: [PHP] Next and Preview Row

2002-02-22 Thread Andrey Hristov
My dump: # phpMyAdmin MySQL-Dump # http://phpwizard.net/phpMyAdmin/ # # Host: 192.168.1.11:3306 Database : test # # # Table structure for table 'some' # CREATE TABLE some ( id varchar(6) NOT NULL, descr varchar(250) NOT NULL ); # #

Re: [PHP] Next and Preview Row

2002-02-22 Thread Chris Boget
> How do I find out a next and preview row values by using PHP and MYSQL. For > examples, Take a look at the function mysql_result(); Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php