johannes Wed Mar 25 10:27:22 2009 UTC Modified files: /php-src/ext/mysql php_mysql.c /php-src/ext/mysql/tests mysql_db_query.phpt Log: mysql_db_query() is always deprecated http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.273&r2=1.274&diff_format=u Index: php-src/ext/mysql/php_mysql.c diff -u php-src/ext/mysql/php_mysql.c:1.273 php-src/ext/mysql/php_mysql.c:1.274 --- php-src/ext/mysql/php_mysql.c:1.273 Wed Feb 18 16:33:28 2009 +++ php-src/ext/mysql/php_mysql.c Wed Mar 25 10:27:21 2009 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.273 2009/02/18 16:33:28 johannes Exp $ */ +/* $Id: php_mysql.c,v 1.274 2009/03/25 10:27:21 johannes Exp $ */ /* TODO: * @@ -1505,10 +1505,7 @@ CHECK_LINK(id); } - /* FIXME: Unicode support??? */ - if (MySG(trace_mode) || !strcasecmp(get_active_function_name(TSRMLS_C).s, "mysql")) { - php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "use mysql_query() instead"); - } + php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "use mysql_query() instead"); php_mysql_do_query_general(query, &mysql_link, id, db, MYSQL_STORE_RESULT, return_value TSRMLS_CC); } http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_db_query.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/mysql/tests/mysql_db_query.phpt diff -u php-src/ext/mysql/tests/mysql_db_query.phpt:1.3 php-src/ext/mysql/tests/mysql_db_query.phpt:1.4 --- php-src/ext/mysql/tests/mysql_db_query.phpt:1.3 Fri Oct 12 12:32:39 2007 +++ php-src/ext/mysql/tests/mysql_db_query.phpt Wed Mar 25 10:27:22 2009 @@ -25,7 +25,7 @@ printf("[003] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp); require('table.inc'); -if (!$res = mysql_db_query($db, 'SELECT id, label FROM test ORDER BY id LIMIT 1', $link)) +if (!$res = @mysql_db_query($db, 'SELECT id, label FROM test ORDER BY id LIMIT 1', $link)) printf("[004] [%d] %s\n", mysql_errno($link), mysql_error($link)); $row = mysql_fetch_assoc($res); @@ -40,7 +40,7 @@ mysql_free_result($res); -if (!$res = mysql_db_query($db, 'SELECT id, label FROM test ORDER BY id LIMIT 1')) +if (!$res = @mysql_db_query($db, 'SELECT id, label FROM test ORDER BY id LIMIT 1')) printf("[007] [%d] %s\n", mysql_errno(), mysql_error()); $row = mysql_fetch_assoc($res); @@ -58,4 +58,4 @@ print "done!\n"; ?> --EXPECTF-- -done! \ No newline at end of file +done!
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php