Bug #62348 [NEW]: mysqli query does not return false on DELETE

From: Date: Mon, 18 Jun 2012 00:14:46 +0000
Subject: Bug #62348 [NEW]: mysqli query does not return false on DELETE
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-171335@lists.php.net to get a copy of this message
From:             valentiny510 at yahoo dot es
Operating system: XP
PHP version:      5.4.4
Package:          MySQLi related
Bug Type:         Bug
Bug description:mysqli query does not return false on DELETE

Description:
------------
Honestly, i'm not realy sure if is php or mysql thing..
Look at the test script

NOTE: id 2 DOES NOT exists and MYSQL_REPORT_ALL does nor report anything
:S


Test script:
---------------
mysqli_report( MYSQLI_REPORT_ALL );

$db = new mysqli('.', 'root', 'pass', 'database');

if (!$db->query('DELETE FROM sessions WHERE id = 2'))
    echo 'Cannot delete session: ', $db->error;
else
    echo 'DELETED';


Expected result:
----------------
Cannot delete session: "some error from mysqli"


Actual result:
--------------
DELETED

-- 
Edit bug report at https://bugs.php.net/bug.php?id=62348&edit=1
-- 
Try a snapshot (PHP 5.4):            https://bugs.php.net/fix.php?id=62348&r=trysnapshot54
Try a snapshot (PHP 5.3):            https://bugs.php.net/fix.php?id=62348&r=trysnapshot53
Try a snapshot (trunk):              https://bugs.php.net/fix.php?id=62348&r=trysnapshottrunk
Fixed in SVN:                        https://bugs.php.net/fix.php?id=62348&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62348&r=needdocs
Fixed in release:                    https://bugs.php.net/fix.php?id=62348&r=alreadyfixed
Need backtrace:                      https://bugs.php.net/fix.php?id=62348&r=needtrace
Need Reproduce Script:               https://bugs.php.net/fix.php?id=62348&r=needscript
Try newer version:                   https://bugs.php.net/fix.php?id=62348&r=oldversion
Not developer issue:                 https://bugs.php.net/fix.php?id=62348&r=support
Expected behavior:                   https://bugs.php.net/fix.php?id=62348&r=notwrong
Not enough info:                     https://bugs.php.net/fix.php?id=62348&r=notenoughinfo
Submitted twice:                     https://bugs.php.net/fix.php?id=62348&r=submittedtwice
register_globals:                    https://bugs.php.net/fix.php?id=62348&r=globals
PHP 4 support discontinued:          https://bugs.php.net/fix.php?id=62348&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=62348&r=dst
IIS Stability:                       https://bugs.php.net/fix.php?id=62348&r=isapi
Install GNU Sed:                     https://bugs.php.net/fix.php?id=62348&r=gnused
Floating point limitations:          https://bugs.php.net/fix.php?id=62348&r=float
No Zend Extensions:                  https://bugs.php.net/fix.php?id=62348&r=nozend
MySQL Configuration Error:           https://bugs.php.net/fix.php?id=62348&r=mysqlcfg



Thread (5 messages)

« previous php.bugs (#171335) next »