note 76565 modified in mysqli.stmt-bind-param by danbrown

From: Date: Tue, 09 Dec 2008 04:56:09 +0000
Subject: note 76565 modified in mysqli.stmt-bind-param by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147934@lists.php.net to get a copy of this message
Some examples in the documentation suggest that you can call $stmt->bind_param() once, then call $stmt->execute() several times while altering the bound variables each time, so as to e.g. insert several records into a data base. This is not true. You need to call $stmt->bind_param() once each time AFTER you altered the set of variables, and BEFORE you call $stmt->execute() This may be a bug. If it is not, the documentation is flawed, and there is no gain to the programmer using the new mysqli interface at this point. --was-- Some examples in the documentation suggest that you can call $stmt->bind_param() once, then call $stmt->execute() several times while altering the bound variables each time, so as to e.g. insert several records into a data base. This is not true. You need to call $stmt->bind_param() once each time AFTER you altered the set of variables, and BEFORE you call $stmt->execute() This may be a bug. If it is not, the documentation is flawed, and there is no gain to the programmer using the new mysqli interface at this point. http://php.net/manual/en/mysqli.stmt-bind-param.php

« previous php.notes (#147934) next »