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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
To: <php-db@xxxxxxxxxxxxx>
Sent: Wednesday, June 06, 2007 1:14 AM
Subject:  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
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux