Re: PHP 4.0 Bug #2874: Cast needed for sybase_fetch_array
| From: | Joey | Date: | Tue, 30 Nov 1999 16:04:59 +0000 |
| Subject: | Re: PHP 4.0 Bug #2874: Cast needed for sybase_fetch_array | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-13300@lists.php.net to get a copy of this message | ||
I'm not sure I understand your bug...what does php3 return?
Also, Zeev fixed a bug in sybase-ct after b3, although I don't think it is
related to yours, you may want to try updating from CVS...or get a
snapshot from after Nov 19....I forget where they keep the snapshots off
hand.
--Joey Smith
On 30 Nov 1999 peter@mediasvar.se wrote:
> From: peter@mediasvar.se
> Operating system: Solaris 2.6
> PHP version: 4.0 Beta 3
> PHP Bug Type: Sybase-ct (ctlib) related
> Bug description: Cast needed for sybase_fetch_array
>
> This is a sample for PHP4 b3. How come these errors occours?
> $j and $k should be equal but they are not. only $j works. should it really be this way?
> in the php3-way you didn't need to cast.
>
> -- CUT --
> <?
> $sql = "select * from linkdb_intresse where id<10";
> $res = sybase_query($sql,$conn);
>
> $i=0;
> while ($rs = sybase_fetch_array($res))
> {
> if ($i++ == 0) {
> $j = (string) $rs[1];
> $k = $rs[1];
> }
> echo $j.", ".$k."<BR>";
> // $j and $k should be equal but they are not. only $j works. should it really be this way?
> // in the php3-way you didn't need to cast.
> }
>
> /*
> Sample output:
> -- CUT --
> Test1, Test1
> Test1,
> Test1,
> Test1,
> Test1, Test2
> Test1,
> Test1,
> Test1,
> Test1, Test3
> -- CUT --
> */
> ?>