public function updateCourseCate(\CategoryVO $obj) { $config_properties = (require '../../model-db-connection/GoGetRighconf.properties.php'); // Create connection $mysqli = new mysqli($config_properties['domain'], $config_properties['username'], $config_properties['password'], $config_properties['databasename']); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit; } $mysqli->set_charset("utf8"); // prepare and bind $stmt = $mysqli->prepare("UPDATE GTRICH_COURSE_CATEGORY SET CATE_NAME=?,CATE_CREATE_DATE_TIME=? WHERE CATE_ID=?"); $stmt->bind_param("sss", $obj->getCateName(), $obj->getCateDate(), $obj->getCateID()); if ($stmt->execute()) { return 200; } else { return "503 Internal Error:" . $stmt->error; } $stmt->close(); $mysqli->close(); }