Re: mysql_result(), Unable to jump to row 1 on MySQLresult

From: Date: Tue, 11 Jul 2000 09:53:34 +0000
Subject: Re: mysql_result(), Unable to jump to row 1 on MySQLresult
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-24171@lists.php.net to get a copy of this message
I use mysql_result() probably too often... Row numbers start at 0. I usually do something like: $I = 0; $Count = mysql_num_rows( $Result ); while( $I < $Count ) { $Variable = mysql_Result( $Result, $I, 'Variable' ); }
Hah, it wasn´t the rownumbers offset (which starts at 1 for ODBC not vor MySQL) it was the fields offset which starts (logically) at 0 too (and starts at 1 for ODBC). I think I´ve done too much ODBC stuff :) It just did not come into my mind that field numbers can start with 0. Maybe we should include it in the docu like it´s included for ODBC functions (row_number, field offset starts at 0) regards -- o----------0-¬---------O-·---¬----o---®-----o o O ° . | http://www.kiffen.de | pRoteçt y0ur bRaín |0 O ° ¤ ° · 0°·³°²'²³-¹'³´³°^°³~³²³°'³²²¨³²^³¹³²°²³`³º³°Þ ° o © ° . · | psychedelic experience | gott@kiffen.de | O ° o ° o-¬--o--0-----©-·--O-----o-----0-¤----------o 0 ° · ° . ¤ ·

« previous php.dev (#24171) next »