cvs: php-src(PHP_5_3) /ext/mysql php_mysql.c /ext/mysql/tests mysql_db_query.phpt
| From: | Johannes Schlüter | Date: | Wed, 25 Mar 2009 10:27:38 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/mysql php_mysql.c /ext/mysql/tests mysql_db_query.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-56719@lists.php.net to get a copy of this message | ||
johannes Wed Mar 25 10:27:38 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/mysql php_mysql.c
/php-src/ext/mysql/tests mysql_db_query.phpt
Log:
MFH: mysql_db_query() is always deprecated
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.16.2.35&r2=1.213.2.6.2.16.2.36&diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.35
php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.36
--- php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.35 Wed Feb 18 16:34:47 2009
+++ php-src/ext/mysql/php_mysql.c Wed Mar 25 10:27:38 2009
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.35 2009/02/18 16:34:47 johannes Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.36 2009/03/25 10:27:38 johannes Exp $ */
/* TODO:
*
@@ -1472,9 +1472,7 @@
CHECK_LINK(id);
}
- if (MySG(trace_mode) || !strcasecmp(get_active_function_name(TSRMLS_C), "mysql")) {
- php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated; use
mysql_query() instead.");
- }
+ php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated; use
mysql_query() instead");
php_mysql_do_query_general(query, query_len, 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.2.2.3&r2=1.2.2.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.2.2.3
php-src/ext/mysql/tests/mysql_db_query.phpt:1.2.2.4
--- php-src/ext/mysql/tests/mysql_db_query.phpt:1.2.2.3 Fri Oct 12 11:57:18 2007
+++ php-src/ext/mysql/tests/mysql_db_query.phpt Wed Mar 25 10:27:38 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!