summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-04-10 04:35:51 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-04-10 04:35:51 +0000
commit9ee32440ad6994aef981e025cf4bbe4f4801896f (patch)
treeb22ad15eefecaf070868ae01438a0646ca1be951 /ext/mysql/php_mysql.c
parent729d43f7331158f232ea63dd4af7321f7e8ae331 (diff)
downloadphp-git-9ee32440ad6994aef981e025cf4bbe4f4801896f.tar.gz
MFH
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r--ext/mysql/php_mysql.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index d5d3544061..75376f7c43 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -1170,7 +1170,6 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
{
php_mysql_conn *mysql;
MYSQL_RES *mysql_result;
- char tmp[128];
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, link_id, "MySQL-Link", le_link, le_plink);
@@ -1189,7 +1188,7 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
mysql_result = (MYSQL_RES *) zend_list_find(mysql->active_result_id, &type);
if (mysql_result && type==le_result) {
if (!mysql_eof(mysql_result)) {
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s(): Function called without first fetching all rows from a previous unbuffered query");
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Function called without first fetching all rows from a previous unbuffered query");
while (mysql_fetch_row(mysql_result));
}
zend_list_delete(mysql->active_result_id);
@@ -1216,12 +1215,9 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
mysql_result = mysql_use_result(&mysql->conn);
while ((row = mysql_fetch_row(mysql_result))) {
if (!strcmp("ALL", row[1])) {
- sprintf((char *)&tmp, "Your query requires a full tablescan (table %s, %s rows affected). Use EXPLAIN to optimize your query.", row[0], row[6]);
- php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, tmp);
- }
- else if (!strcmp("INDEX", row[1])) {
- sprintf((char *)&tmp, "Your query requires a full indexscan (table %s, %s rows affected). Use EXPLAIN to optimize your query.", row[0], row[6]);
- php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, tmp);
+ php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "Your query requires a full tablescan (table %s, %s rows affected). Use EXPLAIN to optimize your query.", row[0], row[6]);
+ } else if (!strcmp("INDEX", row[1])) {
+ php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "Your query requires a full indexscan (table %s, %s rows affected). Use EXPLAIN to optimize your query.", row[0], row[6]);
}
}
mysql_free_result(mysql_result);