Bug #35450 [Com]: mysqli extension reports too many warnings

From: Date: Wed, 15 Mar 2023 20:19:33 +0000
Subject: Bug #35450 [Com]: mysqli extension reports too many warnings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243912@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=35450&edit=1

 ID:                 35450
 Comment by:         rg at mejoramos dot com
 Reported by:        jellicle at gmail dot com
 Summary:            mysqli extension reports too many warnings
 Status:             Not a bug
 Type:               Bug
 Package:            MySQLi related
 Operating System:   Debian
 PHP Version:        5.1.0
 Block user comment: N
 Private report:     N

 New Comment:

yet in 2023 continue identical BUG:

simply execute the QUERY:

"SHOW FIELDS FROM table;"

then you will obtain [Fatal error. . .]

( PHP 8.1 )


Previous Comments:
------------------------------------------------------------------------
[2005-11-28 17:07:45] tony2001@php.net

Use mysqli_report() to disable that.

------------------------------------------------------------------------
[2005-11-28 16:35:26] jellicle at gmail dot com

Description:
------------
Mysqli extension throws too many warnings.  For example, "SELECT * FROM table" results in
a warning: "Warning: mysqli::query(): No index used in query/prepared statement SELECT * FROM
table ..."  There's no way to have MySQL use an index when selecting all records, so this
warning appears every time one wants to select all records from any table.  Sometimes Mysqli gives
this warning even when MySQL is apparently using an index (i.e. the same query, 
executed with EXPLAIN, says it's using an index).

Mysqli should give warnings only on real problems.  Not using an index is at most worthy of a
notice, not a warning, especially when there's no way to use an index with a particular query!



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=35450&edit=1


Thread (3 messages)

« previous php.bugs (#243912) next »