Example #1
0
 /**
  *
  * @param unknown $data
  */
 public function updateQuestion($data)
 {
     $result = false;
     $pdo = DbUtil::connect();
     $dao = new M12QuestionDao($pdo);
     // create new category object
     $obj = new M12QuestionBO();
     // get id from request
     if (property_exists($data, 'id')) {
         $obj->setm12questionid($data->id);
     }
     // get the persistance obj from db
     $obj = $dao->getById($obj);
     $obj->import($data);
     $result = $dao->update($obj);
     DbUtil::disconnect();
     return $result;
 }