Bug #1039: odbc_fetch_into( ) doesn't ignore the rownumber parameter if it is not supporte
| From: | ccjust at prentice dot uq dot edu dot au | Date: | Thu, 07 Jan 1999 07:05:40 +0000 |
| Subject: | Bug #1039: odbc_fetch_into( ) doesn't ignore the rownumber parameter if it is not supporte | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-3356@lists.php.net to get a copy of this message | ||
From: ccjust@prentice.uq.edu.au
Operating system: NT4.0 and MSSQL 6.5
PHP version: 3.0.6
PHP Bug Type: ODBC related
Bug description: odbc_fetch_into( ) doesn't ignore the rownumber parameter if it is not
supporte
All these tests where done on an
- NT4.0 System latest Service Packs
- MSSQL Server 6.5 (Running on the same machine).
- PHP 3.06 Win32 Binary supplied from the PHP website.
odbc_fetch_into( ) doesn't ignore the rownumber parameter if it is not supported by the
database.
The function odbc_fetch_row( ) does however.
But odbc_fetch_row( ) doesn't autoincrement the cursor/current row
which is something odbc_fetch_into( ) does.
In short odbc_fetch_into( ) needs to ignore the rownumber when not supported by the database.
odbc_fetch_row( ) needs to autoincrement the cursor when executed when rownumber not supported..
or
Find a way to have the rownumber working with ODBC and MSSQL 6.5
(I would try if I had the slightest idea where to start and knew how to compile a Win32 binary. :) )
The Code
-------------------------------
$testarray = array();
$status = odbc_fetch_into($q->Query_ID,0,&$testarray);
echo "Stat is -- ".IntVal($status).".";
echo "Here it is -- ".$testarray[1]."<BR>";
$status = odbc_fetch_into($q->Query_ID,4,&$testarray);
echo "Stat is -- ".IntVal($status).".";
echo "Here it is -- ".$testarray[1]."<BR>";
$status = odbc_fetch_into($q->Query_ID,0,&$testarray);
echo "Stat is -- ".IntVal($status).".";
echo "Here it is -- ".$testarray[1]."<BR>";
$status = odbc_fetch_row($q->Query_ID,1);
$value = odbc_result($q->Query_ID,2);
echo "Stat is -- ".IntVal($status).".";
echo "Here it is -- ".$value."<BR>";
$status = odbc_fetch_row($q->Query_ID,3);
$value2 = odbc_result($q->Query_ID,2);
echo "Stat is -- ".IntVal($status).".";
echo "Here it is -- ".$value2."<BR>";
-----------------------------
Returns the results
-----------------------------
Stat is -- 19.Here it is -- Bail
Stat is -- 0.Here it is -- Bail
Stat is -- 19.Here it is -- Cash
Stat is -- 0.Here it is -- Cash
Stat is -- 0.Here it is -- Cash
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net