Home > Archive > PHP Pear > February 2008 > Re: [PEAR] Re: Is this a bug with MDB2_Extended executeMultiple?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PEAR] Re: Is this a bug with MDB2_Extended executeMultiple?
|
|
| Dmitri 2008-02-02, 7:18 pm |
| Thank you. Yes, it has something to do with placeholders.
Actuall it's not caused by the '#' sign. Sorry about the confusion,
after testing it I found that I'm getting the same error
even without the '#' sign. However the error does not come up all the
time. This is what's strange about it.
I still have not found a solution, I'll try to use named placeholders
like :style_value, :style_name, etc.
I also think it may be due to mismatched types.
I wonder if this is because the MDB2 drivere expects the type 'text' but
then sees that the value looks like a hexidecimal and assumes that it's
an integer, thus a mismatch?
For now I started using autoExecute from inside the loop instead of
using executeMultiple
This works for me, at least for now.
Lorenzo Alberton wrote:
>
> in this case a 'not found' error is most probably
> due to a missing placeholder.
>
> You can get a more detailed message calling
> getUserInfo():
>
> ==================================
> $res = $mdb2->extended->executeMultiple($sth, $alldata);
> if (PEAR::isError($res)) {
> echo 'ERROR: '. $res->getMessage(). ' :: ' . $res->getUserInfo();
> }
> ==================================
>
> HTH
>
> Best regards,
| |
| Lorenzo Alberton 2008-02-02, 7:18 pm |
| Dmitri wrote:
> Thank you. Yes, it has something to do with placeholders.
>
> Actuall it's not caused by the '#' sign. Sorry about the confusion,
> after testing it I found that I'm getting the same error
> even without the '#' sign. However the error does not come up all the
> time. This is what's strange about it.
>
> I still have not found a solution, I'll try to use named placeholders
> like :style_value, :style_name, etc.
>
> I also think it may be due to mismatched types.
> I wonder if this is because the MDB2 drivere expects the type 'text' but
> then sees that the value looks like a hexidecimal and assumes that it's
> an integer, thus a mismatch?
that's possible. The type auto-detection uses gettype(),
IIRC, which might consider your hexcode as a number.
Using autoExecute() and passing the data types is
certainly a safer option.
Best regards,
--
Lorenzo Alberton
http://pear.php.net/user/quipo
________________________________________
________________________________
Quipo Free Internet: sicuro e veloce senza costi di attivazione e senza
canone, 2 e-mail da 25 Mb, 150 Mb di spazio web e molto di pił!
Registrati gratis: http://www.quipo.it
|
|
|
|
|