Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001041

Re: [PHP-DB] access Rows From: phobo (antiphobo <email protected>)
Date: 04/12/01

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" <johannes.janson <email protected>>
To: <php-db <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"" <mpeloso <email protected>> schrieb im Newsbeitrag
> news:9b4e4n$gmh$1 <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
> > mpeloso <email protected>
> >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> > For additional commands, e-mail: php-db-help <email protected>
> > To contact the list administrators, e-mail: php-list-admin <email protected>
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>