summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_driver.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2007-07-24 16:13:26 +0000
committerAndrey Hristov <andrey@php.net>2007-07-24 16:13:26 +0000
commit222174e23fe2e5583ecf9bf3f002190fd5b19120 (patch)
treee3f84d2b146f50276444987c08d2ef6fa163f770 /ext/mysqli/mysqli_driver.c
parent9343c54040883483b20824ad50252e64b348a1cd (diff)
downloadphp-git-222174e23fe2e5583ecf9bf3f002190fd5b19120.tar.gz
Import of mysqlnd and ext/mysql + ext/mysqli patched to be built either
with libmysql or mysqld. Use --with-mysql=mysqlnd --with-mysqli=mysqlnd to build with mysqlnd.
Diffstat (limited to 'ext/mysqli/mysqli_driver.c')
-rw-r--r--ext/mysqli/mysqli_driver.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/mysqli/mysqli_driver.c b/ext/mysqli/mysqli_driver.c
index 37669b1b1d..a76c782c2e 100644
--- a/ext/mysqli/mysqli_driver.c
+++ b/ext/mysqli/mysqli_driver.c
@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 6 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
@@ -12,7 +12,9 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Author: Georg Richter <georg@php.net> |
+ | Authors: Georg Richter <georg@php.net> |
+ | Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
@@ -27,7 +29,7 @@
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
-#include "php_mysqli.h"
+#include "php_mysqli_structs.h"
#include "zend_exceptions.h"
@@ -112,7 +114,7 @@ static int driver_client_version_read(mysqli_object *obj, zval **retval TSRMLS_D
static int driver_client_info_read(mysqli_object *obj, zval **retval TSRMLS_DC)
{
ALLOC_ZVAL(*retval);
- ZVAL_RT_STRING(*retval, MYSQL_SERVER_VERSION, 1);
+ ZVAL_RT_STRING(*retval, (char *)mysql_get_client_info(), 1);
return SUCCESS;
}
/* }}} */
@@ -153,8 +155,10 @@ mysqli_property_entry mysqli_driver_property_entries[] = {
/* {{{ mysqli_driver_methods[]
*/
zend_function_entry mysqli_driver_methods[] = {
+#if defined(HAVE_EMBEDDED_MYSQLI)
PHP_FALIAS(embedded_server_start, mysqli_embedded_server_start, NULL)
PHP_FALIAS(embedded_server_end, mysqli_embedded_server_end, NULL)
+#endif
{NULL, NULL, NULL}
};
/* }}} */