Re: Multiple prepared statements and preparing a stored procedure...

From: Date: Wed, 06 Jun 2007 01:39:55 +0000
Subject: Re: Multiple prepared statements and preparing a stored procedure...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-43663@lists.php.net to get a copy of this message
nope!! unless u build 2 class.. that's for save actualy.. $db1 = new mysqli($sqlServer, $sqlUser, $sqlPass, $sqlDB); $db2 = new mysqli($sqlServer, $sqlUser, $sqlPass, $sqlDB); ----- Original Message ----- From: "Ken Keefe" <kjkeefe@gmail.com> To: <php-db@lists.php.net> Sent: Wednesday, June 06, 2007 1:14 AM Subject: [PHP-DB] Multiple prepared statements and preparing a stored procedure... > Is it possible to have multiple prepared statements associated with a > single mysqli object at one time? > > For example: > > $db = new mysqli($sqlServer, $sqlUser, $sqlPass, $sqlDB); > $query1 = $db->prepare($sql1); > $query2 = $db->prepare($sql2); > foreach ($arr as $key => $val) > if($val) > { > $query1->bind_param("s", $key); > $query1->execute(); > } > else > { > $query2->bind_param("s", $key); > $query2->execute(); > } > $query1->close(); > $query2->close(); > > > Also, is there any benefit to using a prepared statement to call a > stored procedure? If so, how do I prepare another statement after the > stored procedure? I keep getting an error about being out of sync... > > Thanks, > Ken > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.db (#43663) next »