]> granicus.if.org Git - php/commitdiff
make scrollable cursors consistent with odbc; removing bogus attribute
authorWez Furlong <wez@php.net>
Wed, 12 Jan 2005 05:58:58 +0000 (05:58 +0000)
committerWez Furlong <wez@php.net>
Wed, 12 Jan 2005 05:58:58 +0000 (05:58 +0000)
ext/pdo_oci/oci_driver.c

index 1d72d2c55dd2cedeee26c328872d2c1c1d546365..01a79c1699bf17d8e9545367b749cc201a0979ec 100755 (executable)
@@ -198,8 +198,9 @@ static int oci_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, pd
        ub4 prefetch;
 
 #if HAVE_OCISTMTFETCH2
-       S->exec_type = pdo_attr_lval(driver_options, PDO_ATTR_SCROLL,
-               0 TSRMLS_CC) ? OCI_STMT_SCROLLABLE_READONLY : OCI_DEFAULT;
+       S->exec_type = pdo_attr_lval(driver_options, PDO_ATTR_CURSOR,
+               PDO_CURSOR_FWDONLY TSRMLS_CC) == PDO_CURSOR_SCROLL ?
+               OCI_STMT_SCROLLABLE_READONLY : OCI_DEFAULT;
 #else
        S->exec_type = OCI_DEFAULT;
 #endif