Prepared statements
| From: | Julius Hacker | Date: | Fri, 03 Mar 2006 22:44:08 +0000 |
| Subject: | Prepared statements | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-231424@lists.php.net to get a copy of this message | ||
Hi,
so I need help again:
I want to use prepared statements to insert lots of data in my
MySQL-database.
For that I use foreach because I have an array containing all necessary
information.
Before that foreach, I use mysqli_stmt_init, mysql_stmt_prepare and
mysql_stmt_bind_param.
In the foreach-loop I give the variables, which I bound with bind_param,
their values and want to execute the statement.
But now MySQL returns always an error.
It seems that the values I gave the variables in the loop aren't used
because I used bind_param before that.
In the example for mysql_bind_param they do it like me.
Is the example also wrong or do I have to consider something special?
--
Regards
Julius Hacker
http://www.julius-hacker.de
julius@finalfuture.de
OpenPGP-Key-ID: 0x4B4A486E