php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10237 sybase_query returns 1 instead of link id with action queries
Submitted: 2001-04-09 02:01 UTC Modified: 2001-04-09 05:00 UTC
From: tyson dot lloydthwaites at ite dot com dot au Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.0.4pl1 OS: Linux 2.2.16-3, Redhat 6.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tyson dot lloydthwaites at ite dot com dot au
New email:
PHP Version: OS:

 

 [2001-04-09 02:01 UTC] tyson dot lloydthwaites at ite dot com dot au
sybase_query returns 1 instead of a link id when I run an action query. The following code reproduces the error:

        $con = sybase_connect("SYBASE", "user", "pass");
	sybase_select_db("cope");
	$qry = sybase_query("update ...", $con);

	echo sybase_affected_rows($qry);	
	sybase_close($con);

The update query works in isql.

Here is my configure line:
'./configure' '--with-apache=../apache_1.3.19' '--with-sybase-ct=/opt/sybase' '--with-curl=../curl-7.7' '--with-mm=../mm-1.1.3' '--enable-bcmath' '--enable-calendar' '--enable-ctype' '--enable-exif' '--enable-ftp' '--enable-gd-imgstrttf' '--with-gd' '--enable-trans-sid' '--enable-shmop' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-09 05:00 UTC] joey@php.net
Link ID is returned by sybase_connect, not sybase_query.
In your example, use:
echo sybase_affected_rows($con);

A close examination of the PHP Manual will solve this kind
of confusion.

Not a bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 21:01:28 2024 UTC