php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13976 sybase_query("UPDATE/INSERT") returns FALSE on success
Submitted: 2001-11-07 07:58 UTC Modified: 2001-11-09 10:03 UTC
From: pavel at templation dot net Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.0.6 OS: FreeBSD 4.3 RC
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
7 + 27 = ?
Subscribe to this entry?

 
 [2001-11-07 07:58 UTC] pavel at templation dot net
 if i send UPDATE/INSERT/DELETE query to the
 script quoted bellow, it will display an empty
 string as a result of the sybase_query call
 even if the query was correctly processed.

 e.g. when i send "delete from testtable",
 sybase_query returns false, but i can see 
 all records from testtable are deleted.
 otherwise if i try to send "select" query,
 i can see something like "Resource id #xx"
 on success.

 i'm using php 4.0.6 compiled as an apache's dso,
 and freetds 0.52 from the freebsd ports collection
 (php and apache 1.3.22 are also compiled from
 the freebsd ports collection).

test script starts here:

<form action="<?php echo $PHP_SELF ?>" method="post">
<textarea name="query" rows="6" cols="50" vrap="virtual">
<?php echo htmlspecialchars($query) ?></textarea>
<br><input type="submit" value="submit">
</form>

<?php

$link   = sybase_connect('', 'php', 'xxx');
if (!sybase_select_db('tempdb', $link)) {
        die("can't use db");
}

$res    = sybase_query($query, $link);

echo "res = $res<br>\n";

?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-08 10:20 UTC] pavel at templation dot net
It was probably bug in FreeTDS, at least according to 

http://franklin.oit.unc.edu/cgi-bin/lyris.pl?visit=freetds&id=163709519

PHP4 with FreeTDS from the current CVS seems to work correctly.
 [2001-11-09 10:03 UTC] sniper@php.net
Closed then.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 19:01:33 2024 UTC