#14354 [Opn->Fbk]: sybase_query returns 1 regardless of delete success
| From: | sniper@php.net | Date: | Sun, 18 May 2003 18:00:26 +0000 |
| Subject: | #14354 [Opn->Fbk]: sybase_query returns 1 regardless of delete success | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39891@lists.php.net to get a copy of this message | ||
ID: 14354
Updated by: sniper@php.net
Reported By: mheumann at sei dot cl
-Status: Open
+Status: Feedback
Bug Type: Sybase (dblib) related
Operating System: Linux Mandrake 8
PHP Version: 4.1.1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
And use --with-sybase-ct configure option instead.
Previous Comments:
------------------------------------------------------------------------
[2002-01-08 17:08:45] mheumann at sei dot cl
Let me try to give you some more information to reproduce the problem.
1. create two tables in Sybase where one of them should include a field
that represents a reference to the ID field of the other.
2. create a delete trigger on the parent table of that reference, so
that deletion is prevented if a reference to the deleted record exists
in the other table.
3. insert data into the tables making sure a record references another
in the second table
4. use sybase_query to delete a record in the parent table. PHP will
display a warning message of the type "Warning: Sybase message:
Children still exist in "table1". Cannot delete parent "table2".
(severity 16) in /path/to/file.php on line x". sybase_query will
return 1.
5. use sybase_query to delete a record that has no reference to the
parent table. It will be deleted and sybase_query also returns 1.
------------------------------------------------------------------------
[2002-01-08 17:02:43] mheumann at sei dot cl
I just tried it on php 4.1.1 and the problem still exists.
------------------------------------------------------------------------
[2002-01-07 02:34:06] lobbin@php.net
Does this problem still exist on 4.1.1?
------------------------------------------------------------------------
[2001-12-12 06:41:44] derick@php.net
oh, ok, then it is not bogus.
------------------------------------------------------------------------
[2001-12-12 06:24:21] mheumann at sei dot cl
I'm not sure if I can agree with you on that. If I don't use the @
sign, sybase_query displays a warning of the type
Warning: Sybase message: Children still exist in 'table1'. Cannot
delete parent 'table2'. (severity 16) in /path/to/my/script.php on line
1432
Doesn't that mean that sybase_query didn't return ok?
Besides, according to the documentation, the function
sybase_affected_rows is only implemented for the ct library, not dblib.
Unfortunately, we haven't been able to get sybase-ct to work for us,
even though we tried all the hints we could get.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/14354
--
Edit this bug report at http://bugs.php.net/?id=14354&edit=1