openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit f3d58b37da34e49a968bc171c3faab19292dee5c
parent 34df067eddc8638879e4e91c25cf02756c40285f
Author: dankert <devnull@localhost>
Date:   Thu, 15 Oct 2009 01:10:31 +0200

Reihenfolge der Prepared-Statement-Variablen beibehalten, so dass es unwichtig ist, in welcher Reihenfolge die Variablen im Code gesetzt werden.

Diffstat:
db/db.class.php | 18++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/db/db.class.php b/db/db.class.php @@ -160,13 +160,27 @@ class DB if ( is_object($query) && $this->conf['prepare'] ) { $this->client->clear(); - //Html::debug($query); $this->client->prepare( $query->raw,$query->param ); - foreach( $query->data as $name=>$value) + /* + foreach ($query->param as $name=>$unused) + $data[$name] = array('type'=>'null'); + + foreach ($query->data as $name=>$unused) + $data[$name] = &$value; + + foreach( $data as $name=>$value) { $this->client->bind($name,$value); } + */ + /* + Html::debug($query->data,'DATA'); + foreach ($query->param as $name=>$unused) + Html::debug($query->data[$name],$name); + */ + foreach ($query->param as $name=>$unused) + $this->client->bind($name,$query->data[$name]); $result = $this->client->query($query);