RE: PHP 4.0 Bug #10237 Updated: sybase_query returns 1 instead of link id with action queries
| From: | Tyson Lloyd Thwaites | Date: | Tue, 10 Apr 2001 00:16:11 +0000 |
| Subject: | RE: PHP 4.0 Bug #10237 Updated: sybase_query returns 1 instead of link id with action queries | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-51256@lists.php.net to get a copy of this message | ||
I see. A little bit of confusion on my part.
From the manual:
"Returns: A positive Sybase result identifier on success, or false on error.
"
I would have thought that the affected_rows function would be called on the
*resource id returned by sybase_query, as it is with odbc_num_rows.
So I conclude that sybase_query returns a resource id with select queries,
but
true/false with action queries. This is different to odbc, hence my
confusion.
Thanks
Regards,
Tyson Lloyd Thwaites
I.T&e Limited
e-Commerce Division
Adelaide
Email: tyson.lloydthwaites@ite.com.au
Phone: (08) 8291 3888
Fax: (08) 8299 9403
> -----Original Message-----
> From: Bug Database [mailto:php-dev@lists.php.net]
> Sent: Monday, April 09, 2001 6:30 PM
> To: tyson.lloydthwaites@ite.com.au
> Subject: PHP 4.0 Bug #10237 Updated: sybase_query returns 1 instead of
> link id with action queries
>
>
> ID: 10237
> Updated by: joey
> Reported By: tyson.lloydthwaites@ite.com.au
> Old-Status: Open
> Status: Closed
> Bug Type: Sybase-ct (ctlib) related
> Assigned To:
> Comments:
>
> 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.
>
> Previous Comments:
> --------------------------------------------------------------
> -------------
>
> [2001-04-09 02:01:54] tyson.lloydthwaites@ite.com.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'
>
> --------------------------------------------------------------
> -------------
>
>
>
> ATTENTION! Do NOT reply to this email!
> To reply, use the web interface found at
> http://bugs.php.net/?id=10237&edit=2
>