Re: [PHP4BETA] More on losing array values...
| From: | Joey | Date: | Sat, 13 Nov 1999 21:21:12 +0000 |
| Subject: | Re: [PHP4BETA] More on losing array values... | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-6202@lists.php.net to get a copy of this message | ||
OK. I'm in a bit over my head here, but here are a few things I see:
Start here:
http://lxr.php.net/source/php4/ext/sybase_ct/php_sybase_ct.c#1237
[ that's php_sybase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS)]
The biggest difference I see between that and
http://lxr.php.net/source/php4/ext/mysql/php_mysql.c#1305
[ php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS) ]
ZEND_FETCH_RESOURCE(result, sybase_result *, &sybase_result_index, -1,
"Sybase result", sybase_globals.le_result);
The 3d arg is &sybase_result_index, with sybase_result_index being:
pval *sybase_result_index;
Whereas in mysql:
3d arg: result
result is pval **result
Like I said, I am in over myhead, so I'm not sure if that matters.
The only other thing I can see is that sybase generates the hash with a
simple for() loop
http://lxr.php.net/source/php4/ext/sybase_ct/php_sybase_ct.c#1259
while mysql is a LOT more complex
http://lxr.php.net/source/php4/ext/mysql/php_mysql.c#1351
I will continue to dig, but I have only gotten halfway into K&R, and have
never written hardly anything in C (I want to learn, butwho has the time,
right?), so I get lost sometimes...
--Joey Smith
On Sat, 13 Nov 1999, Andi Gutmans wrote:
> At 01:00 PM 11/13/99 -0700, Joey wrote:
> >Well, I can't say "only", but it is the only one that _I_ see it in. I
> >tried the same function with mysql, and they worked fine...
>
> Sounds like a specific problem with the sybase support. Try and see if you
> can compare the return value code with MySQL's. Maybe the reference count
> isn't being increased or something similar.
>
> Andi
> ---
> Andi Gutmans <andi@zend.com>
> http://www.zend.com/
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net
>
>