diff options
Diffstat (limited to 'ext/pdo/php_pdo_driver.h')
-rwxr-xr-x | ext/pdo/php_pdo_driver.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h index 598aa05bad..2629aa739f 100755 --- a/ext/pdo/php_pdo_driver.h +++ b/ext/pdo/php_pdo_driver.h @@ -114,7 +114,7 @@ typedef int (*pdo_dbh_close_func)(pdo_dbh_t *dbh TSRMLS_DC); typedef int (*pdo_dbh_prepare_func)(pdo_dbh_t *dbh, const char *sql, long sql_len, pdo_stmt_t *stmt, long options, zval *driver_options TSRMLS_DC); /* execute a statement (that does not return a result set) */ -typedef int (*pdo_dbh_do_func)(pdo_dbh_t *dbh, const char *sql, int sql_len TSRMLS_DC); +typedef int (*pdo_dbh_do_func)(pdo_dbh_t *dbh, const char *sql, long sql_len TSRMLS_DC); /* quote a string */ typedef int (*pdo_dbh_quote_func)(pdo_dbh_t *dbh, const char *unquoted, int unquotedlen, char **quoted, int *quotedlen TSRMLS_DC); @@ -125,6 +125,12 @@ typedef int (*pdo_dbh_txn_func)(pdo_dbh_t *dbh TSRMLS_DC); /* setting and getting of attributes */ typedef int (*pdo_dbh_set_attr_func)(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC); +/* return affected rows */ +typedef long (*pdo_dbh_affected_func)(pdo_dbh_t *dbh TSRMLS_DC); + +/* return last insert id */ +typedef long (*pdo_dbh_last_id_func)(pdo_dbh_t *dbh TSRMLS_DC); + struct pdo_dbh_methods { pdo_dbh_close_func closer; pdo_dbh_prepare_func preparer; @@ -134,6 +140,8 @@ struct pdo_dbh_methods { pdo_dbh_txn_func commit; pdo_dbh_txn_func rollback; pdo_dbh_set_attr_func set_attribute; + pdo_dbh_affected_func affected; + pdo_dbh_last_id_func last_id; }; /* }}} */ @@ -231,10 +239,6 @@ struct _pdo_dbh_t { const char *data_source; unsigned long data_source_len; - /* the number of rows affected by last $dbh->exec(). Not always - * meaningful */ - int affected_rows; - /* the global error code. */ enum pdo_error_type error_code; #if 0 |