We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/php/php-src/pull/6677/files
Viewed @@ -0,0 +1,22 @@ --TEST-- MySQL PDO->mysqlGetWarningCount() --SKIPIF-- <?php require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $assertWarnings = function ($db, $q, $count) { $db->query($q); printf("Query %s produced %d warnings\n", $q, $db->mysqlGetWarningCount()); }; $assertWarnings($db, 'SELECT 1 = 1', 0); $assertWarnings($db, 'SELECT 1 = "A"', 1); ?> --EXPECT-- Query SELECT 1 = 1 produced 0 warnings Query SELECT 1 = "A" produced 1 warnings /* {{{ proto string PDO::mysqlGetWarningCount() Returns the number of SQL warnings during the execution of the last statement */ static PHP_METHOD(PDO, mysqlGetWarningCount) { pdo_dbh_t *dbh; pdo_mysql_db_handle *H; dbh = Z_PDO_DBH_P(ZEND_THIS); PDO_CONSTRUCT_CHECK; H = (pdo_mysql_db_handle *)dbh->driver_data; RETURN_LONG(mysql_warning_count(H->server)); } /* }}} */ static const zend_function_entry dbh_methods[] = { PHP_ME(PDO, mysqlGetWarningCount, NULL, ZEND_ACC_PUBLIC) PHP_FE_END }; static const zend_function_entry *pdo_mysql_get_driver_methods(pdo_dbh_t *dbh, int kind) { switch (kind) { case PDO_DBH_DRIVER_METHOD_KIND_DBH: return dbh_methods; default: return NULL; } } /* {{{ pdo_mysql_request_shutdown */ static void pdo_mysql_request_shutdown(pdo_dbh_t *dbh) { @@ -625,7 +655,7 @@ static const struct pdo_dbh_methods mysql_methods = { pdo_mysql_fetch_error_func, pdo_mysql_get_attribute, pdo_mysql_check_liveness, NULL, pdo_mysql_get_driver_methods, pdo_mysql_request_shutdown, pdo_mysql_in_transaction, NULL /* get_gc */
The text was updated successfully, but these errors were encountered:
This is done.
Sorry, something went wrong.
No branches or pull requests
Description
https://github.com/php/php-src/pull/6677/files
The text was updated successfully, but these errors were encountered: