Re: mysqli_stmt::bind_param(), Number of variables doesn't match number of parameters in prepared statement
| From: | chris smith | Date: | Sat, 01 Jul 2006 00:52:09 +0000 |
| Subject: | Re: mysqli_stmt::bind_param(), Number of variables doesn't match number of parameters in prepared statement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-239036@lists.php.net to get a copy of this message | ||
On 7/1/06, gg15 <gg15@gmx.net> wrote:
I wanted to use the prepared statements of mysqli, but the following problem occured: If I just use one parameter everything works fine $prep = $this->mysqli->prepare('INSERT INTO guestbook (Von, Datum) VALUES (?, NOW())'); $prep->bind_param('s', $this->Von); but if I try to use two $prep = $this->mysqli->prepare('INSERT INTO guestbook (Von, Betreff, Datum) VALUES (?, ?, NOW())'); echo $prep->param_count; // echos 2 $prep->bind_param('ss', $this->Von, $this->Betreff); I get an error Warning: mysqli_stmt::bind_param() : Number of variables doesn't match number of parameters in prepared statement in ...Is $this->Betreff empty? I wonder if its having issues with an empty var.. -- Postgresql & php tutorials http://www.designmagick.com/