Call MySQL Stored Procedure on PHP -


can me on how call stored proc in php? have below function call mysql stored proc commits error.

public function getproductionitems($selectedprojectid,$selectedtaskid,$processingtype,$isfirsttask)     {         $proditemlist = array();          $strqry = "call getproductionitem(".$selectedprojectid.",".$selectedtaskid.",".$processingtype.",".$isfirsttask.")";         $mysqli = new mysqli();         $mysqli = $this->getpvtconnection();         $stmt = $mysqli->query($strqry);          while($data = $stmt->fetch_assoc())         {             $proditem = new productionitemmodel();             $proditem->settaskqueueid($data['taskqueueid']);             $proditem->setproditemname($data['proditemname']);             array_push($proditemlist,$proditem);         }         mysqli_free_result($stmt);         $mysqli->close();          return $proditemlist;     } 

error encountered : fatal error: call member function fetch_assoc() on non-object in c:\appserv\www\ptsproject\dao\projecttask\projtaskdao.php on line 1298

i think missing ':

 $strqry = "call getproductionitem('$selectedprojectid','$selectedtaskid','$processingtype','$isfirsttask')"; 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -