query("select max(id)+1 as id from webs.category"); $obj = $res->fetch_object(); $new_id = $obj->id; ?> prepare("insert into webs.category (`name`, `parent`) values (?, ?)"); $statement->bind_param("si", $name, $parent); $statement->execute(); } while (false); ?>