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 ISEP
;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 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 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: Next and Preview Row

2002-02-22 Thread Roger Baklund
* Roger Baklund > It is even possible to do this with one select statement and four > left joins to the same table, but it is a bit complicated: > > select table.*,next.id as next,prev.id as prev > from table > left join table as prev on > prev.id < table.id > left join table as prev2 on

Re: [PHP] Next and Preview Row

2002-02-22 Thread Raymond Gubala
;[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Subject: [PHP] Next and Preview Row > > Dear All, > > I am using PHP + MYSQL. I have a question that I need some expert > to help. That is: > > How do I find out a next and preview row val

RE: Next and Preview Row

2002-02-22 Thread Roger Baklund
* Mark Lo > Row 10ID00010need this value > Row 11ID00025have this value on hand > Row 12ID00063need this value > > The questions is how do I find out the values in Row 10 and Row 12, if and > only if I only have one data that is "ID00025" (select * from table where > field=

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 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 - Before posting, please check: http://www.mysql.com/manual.php (the

Next and Preview Row

2002-02-22 Thread Mark Lo
Dear All, I am using PHP + MYSQL. I have a question that I need some expert to help. That is: How do I find out a next and preview row values by using PHP and MYSQL. For examples, Row 10ID00010need this value Row 11ID00025have this value on hand Row 12ID00063

Next and Preview Row

2002-02-22 Thread Mark Lo
Dear All, I am using PHP + MYSQL. I have a question that I need some expert to help. That is: How do I find out a next and preview row values by using PHP and MYSQL. For examples, Row 10ID00010need this value Row 11ID00025have this value on hand Row 12ID00063