Many of the DBMS's allow you to choose which row to fetch.
Eg with MySQL, you can use mysql_data_seek() (see
http://www.php.net/manual/en/function.mysql-data-seek.php)
Similar equivilents exist for ODBC, MS SQL etc.
Eg: odbc_fetch_row($result, $rownumber);
What is it about row 5 for example that is special ? You should be using the
DBMS to choose the rows ... the WHERE clause of a select is very powerful,
and you could be overlooking something there?
Siggy
----- Original Message -----
From: "Johannes Janson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 13, 2001 7:40 AM
Subject: Re: [PHP-DB] access Rows
> Hi,
>
> If you exactly know which row you want you could use LIMIT yourRow, 1.
> If you copy the RS into an array first you would have to use a while
> statement
> aswell, or not?
>
> Cheers
> Johannes
>
> ""Mike"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> 9b4e4n$gmh$[EMAIL PROTECTED]">news:9b4e4n$gmh$[EMAIL PROTECTED]...
> > I want to be able to access the rows of a resultset,but I want to
specify
> > which ones.(Lets say $row[5]).Do I have to copy the RS into a seperate
> array
> > first?Most examples enumerate with "while" statements.I dont want to do
> > that.
> > Thanks
> > Mike P
> > [EMAIL PROTECTED]
> >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]