diff options
author | Georg Richter <georg@php.net> | 2002-08-07 22:02:11 +0000 |
---|---|---|
committer | Georg Richter <georg@php.net> | 2002-08-07 22:02:11 +0000 |
commit | 8f7792a7698e0d52966c7c6f4e0ace6dcf14772a (patch) | |
tree | 515963d215d2c5b2d15365d7d866a7a19a8794ac /ext/mysql/php_mysql.c | |
parent | f4b4797aa83b933985d8a9a394416b52c5356154 (diff) | |
download | php-git-8f7792a7698e0d52966c7c6f4e0ace6dcf14772a.tar.gz |
added zend_error messages for deprecated functions
inserted zak and me in author list/credits
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r-- | ext/mysql/php_mysql.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index b04aa5f4ea..bc89b715b1 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -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: Zeev Suraski <zeev@zend.com> | + | Authors: Zeev Suraski <zeev@zend.com> | + | Zak Greant <zak@mysql.com> | + | Georg Richter <georg@php.net> | +----------------------------------------------------------------------+ */ @@ -1107,6 +1109,9 @@ PHP_FUNCTION(mysql_create_db) WRONG_PARAM_COUNT; break; } + + zend_error(E_NOTICE, "%s is deprecated; use mysql_query() to issue a SQL CREATE DATABASE statement instead.", get_active_function_name(TSRMLS_C)); + ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink); @@ -1146,7 +1151,9 @@ PHP_FUNCTION(mysql_drop_db) WRONG_PARAM_COUNT; break; } - + + zend_error(E_NOTICE, "%s is deprecated; use mysql_query() to issue a SQL DROP DATABASE statement instead.", get_active_function_name(TSRMLS_C)); + ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink); @@ -1582,9 +1589,13 @@ PHP_FUNCTION(mysql_escape_string) * we don't realloc() down to the real size since it'd most probably not * be worth it */ + + zend_error(E_NOTICE, "%s is deprecated; use mysql_real_escape_string() instead", get_active_function_name(TSRMLS_C)); + Z_STRVAL_P(return_value) = (char *) emalloc(Z_STRLEN_PP(str)*2+1); Z_STRLEN_P(return_value) = mysql_escape_string(Z_STRVAL_P(return_value), Z_STRVAL_PP(str), Z_STRLEN_PP(str)); Z_TYPE_P(return_value) = IS_STRING; + } /* }}} */ |