Home how to solve this Recoverable fatal error
Reply: 0

how to solve this Recoverable fatal error

user818
1#
user818 Published in May 22, 2018, 11:45 am

note: the sql query is the proplem

an error appers to me in this code says // Recoverable fatal error: Object of class mysqli_result could not be converted to string on line 100

here is the code

  {//this is where the parameters come from
  $db->addmedicine($id,$med->getMedicineName(),$med->getQuantity(),$med- 
  >getPrice(),$med->getExDate(),$med->getProDate());
  }

public function 
 addmedicine($id,$medicinename,$quantity,$price,$exdate,$prodate)
{
    $conn=$this->connect();

  (line 100)-->  $sql = "INSERT INTO `availablemedicine`
(`vendorid`, `medicinename`, `quantity`, `price`, `exdate`, `prodate`) 
VALUES ('$id','$medicinename','$quantity','$price','$exdate','$prodate')";


    $result = mysqli_query($conn,$sql);
}
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.361665 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO