Example #1
0
 public function insert(Food $food)
 {
     $sql = "insert into monan(name, slug, description, material, prepare, tutorial, suggestion) values('" . $food->getName() . "' , '" . $food->getSlug() . "' , '" . $food->getDescription() . "' , '" . $food->getMaterial() . "' , '" . $food->getPrepare() . "' , '" . $food->getTutorial() . "' , '" . $food->getSuggestion() . " ')";
     echo $sql;
     $rowEffect = mysql_query($sql);
     return mysql_affected_rows() == -1 ? false : true;
 }