Re: Prepared statements
| From: | Julius Hacker | Date: | Mon, 06 Mar 2006 21:03:10 +0000 |
| Subject: | Re: Prepared statements | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231552@lists.php.net to get a copy of this message | ||
Curt Zirzow wrote:
>
> I assume your loop is something like:
> while(condition) {
> $auction_parts['id'] = 'some value';
> $auction_parts['name'] = 'some value';
> ...
> $insert->execute();
> }
>
Yes, thats it.
> My first guess would be, if not aleady done, initialize
> $auction_parts before you do your bind_param() with something like:
>
> $auction_parts = array('id' => null, 'name' => null, ...);
> $insert->bind_param("issdsis", $auction_house["id"], ...);
>
Unfortunately it helps nothing :-(
But I think also that it's something because of the declaration and
initalization of the variables because it works if I have the bind_param
in the loop after I gave the variables their values.
But to have the bind_param in the loop isn't the best solution I think.
--
Regards
Julius Hacker
http://www.julius-hacker.de
julius@finalfuture.de
OpenPGP-Key-ID: 0x4B4A486E