mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
added new function int mysql_get_server_version
this function is available since libmysql change set 1.1450 (2002-02-13)
This commit is contained in:
parent
ef086ad82d
commit
44559a18f9
3 changed files with 20 additions and 0 deletions
|
@ -948,6 +948,23 @@ PHP_FUNCTION(mysqli_get_server_info)
|
|||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int mysqli_get_server_version
|
||||
*/
|
||||
PHP_FUNCTION(mysqli_get_server_version)
|
||||
{
|
||||
MYSQL *mysql;
|
||||
zval *mysql_link = NULL;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link");
|
||||
|
||||
RETURN_LONG(mysql_get_server_version(mysql));
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string mysqli_info(resource link)
|
||||
*/
|
||||
PHP_FUNCTION(mysqli_info)
|
||||
|
|
|
@ -73,6 +73,7 @@ function_entry mysqli_functions[] = {
|
|||
PHP_FE(mysqli_get_host_info, NULL)
|
||||
PHP_FE(mysqli_get_proto_info, NULL)
|
||||
PHP_FE(mysqli_get_server_info, NULL)
|
||||
PHP_FE(mysqli_get_server_version, NULL)
|
||||
PHP_FE(mysqli_init, NULL)
|
||||
PHP_FE(mysqli_info, NULL)
|
||||
PHP_FE(mysqli_insert_id, NULL)
|
||||
|
@ -141,6 +142,7 @@ function_entry mysqli_link_methods[] = {
|
|||
PHP_FALIAS(get_host_info,mysqli_get_host_info,NULL)
|
||||
PHP_FALIAS(get_proto_info,mysqli_get_proto_info,NULL)
|
||||
PHP_FALIAS(get_server_info,mysqli_get_server_info,NULL)
|
||||
PHP_FALIAS(get_server_version,mysqli_get_server_version,NULL)
|
||||
PHP_FALIAS(init,mysqli_init,NULL)
|
||||
PHP_FALIAS(info,mysqli_info,NULL)
|
||||
PHP_FALIAS(insert_id,mysqli_insert_id,NULL)
|
||||
|
|
|
@ -179,6 +179,7 @@ PHP_FUNCTION(mysqli_get_client_info);
|
|||
PHP_FUNCTION(mysqli_get_host_info);
|
||||
PHP_FUNCTION(mysqli_get_proto_info);
|
||||
PHP_FUNCTION(mysqli_get_server_info);
|
||||
PHP_FUNCTION(mysqli_get_server_version);
|
||||
PHP_FUNCTION(mysqli_info);
|
||||
PHP_FUNCTION(mysqli_insert_id);
|
||||
PHP_FUNCTION(mysqli_init);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue