Re: access Rows

From: Date: Thu, 12 Apr 2001 21:55:06 +0000
Subject: Re: access Rows
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-8531@lists.php.net to get a copy of this message
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@gmx.de> To: <php-db@lists.php.net> 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@princeton.edu> schrieb im Newsbeitrag > news:9b4e4n$gmh$1@toye.p.sourceforge.net... > > 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@princeton.edu > > > > > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > > For additional commands, e-mail: php-db-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.db (#8531) next »