mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
PDO MySQL: Use set_row_count() helper
This commit is contained in:
parent
8d268e8443
commit
fb69c7752d
1 changed files with 2 additions and 9 deletions
|
@ -113,9 +113,8 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */
|
|||
|
||||
static void pdo_mysql_stmt_set_row_count(pdo_stmt_t *stmt) /* {{{ */
|
||||
{
|
||||
zend_long row_count;
|
||||
pdo_mysql_stmt *S = stmt->driver_data;
|
||||
row_count = (zend_long) mysql_stmt_affected_rows(S->stmt);
|
||||
zend_long row_count = (zend_long) mysql_stmt_affected_rows(S->stmt);
|
||||
if (row_count != (zend_long)-1) {
|
||||
stmt->row_count = row_count;
|
||||
}
|
||||
|
@ -343,9 +342,6 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt) /* {{{ */
|
|||
{
|
||||
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
|
||||
pdo_mysql_db_handle *H = S->H;
|
||||
#ifdef PDO_USE_MYSQLND
|
||||
zend_long row_count;
|
||||
#endif
|
||||
PDO_DBG_ENTER("pdo_mysql_stmt_next_rowset");
|
||||
PDO_DBG_INF_FMT("stmt=%p", S->stmt);
|
||||
|
||||
|
@ -390,10 +386,7 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt) /* {{{ */
|
|||
}
|
||||
}
|
||||
}
|
||||
row_count = (zend_long) mysql_stmt_affected_rows(S->stmt);
|
||||
if (row_count != (zend_long)-1) {
|
||||
stmt->row_count = row_count;
|
||||
}
|
||||
pdo_mysql_stmt_set_row_count(stmt);
|
||||
PDO_DBG_RETURN(1);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue