]> granicus.if.org Git - php/commitdiff
added zend_error messages for deprecated functions
authorGeorg Richter <georg@php.net>
Wed, 7 Aug 2002 22:02:11 +0000 (22:02 +0000)
committerGeorg Richter <georg@php.net>
Wed, 7 Aug 2002 22:02:11 +0000 (22:02 +0000)
inserted zak and me in author list/credits

ext/mysql/CREDITS
ext/mysql/php_mysql.c

index a9e6c3b00c52d3e2e5316358b80653a7bc55f638..bd8f07a9b19f972a5d317ebbd9b8d5aa2671a78c 100644 (file)
@@ -1,2 +1,4 @@
 MySQL
 Zeev Suraski
+Zak Greant
+Georg Richter
index b04aa5f4eadeabb26edc7da7f5d5104429d33cf9..bc89b715b19a2ea505864d2ebe0d3a9eecc80857 100644 (file)
@@ -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;
+
 }
 /* }}} */