PHP alternative to mysql_data_seek for ODBC

I am converting a PHP-mySQL application to a PHP-ODBC application. those. database transfer from mysql to DB2.

When using mysql, I used a mysql_data_seekfunction to reset the record set pointer, but this does not work for an ODBC connection. I tried and checked odbc_fetch_row($recordset,0)to reset the recordset, but this does not work. Does anyone know how to reset a recordset through an ODBC connection?

+5
source share
1 answer

According to docs , you need to pass 1as the second parameter instead 0.

, odbc_fetch_row() row_number 1, odbc_fetch_row() row_number, .

, , :

, row_number .

0

All Articles