ID:               28433
 Updated by:       [EMAIL PROTECTED]
 Reported By:      r dot vanicek at seznam dot cz
-Status:           Open
+Status:           Bogus
 Bug Type:         Sybase (dblib) related
 Operating System: Debian GNU/Linux
 PHP Version:      4.3.6
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

The return value returned by sybase does not indicate an 
error, which is why PHP does not return false. 


Previous Comments:
------------------------------------------------------------------------

[2004-05-18 15:42:35] r dot vanicek at seznam dot cz

Sorry, this is probably not a bug of php_sybase client. If there is a
syntax error in the query, sybase reports "Error" and sybase_query
returns FALSE as expected.

But is there is eg. NULL value specified for a NOT NULL column, sybase
reports "Warning" and sybase_query returns 1 (OK).

The other SQL servers take this as error, and rightly so (I think),
because operation is not completed and no row is entered in the table,
sigh.

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

[2004-05-18 15:28:42] r dot vanicek at seznam dot cz

Description:
------------
sybase_query call should return false when the query fails. This is
true if the query is a "select..." command. But for the other commands
(eg. insert), sybase_query always return 1 no matter if the command is
OK or not. This makes testing the query success/failure nearly
impossible.



Reproduce code:
---------------
$ret = sybase_query("insert");
var_dump($ret);

Expected result:
----------------
false

Actual result:
--------------
1


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


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

Reply via email to