$params = [
"id" => $array['category_id'],
"cat_name" => $array['category_name'],
"cat_url" => $array['category_url'],
"parent_cat" => $array['parent_cat'],
];
if( !empty( $_FILES['cat_image']['name'] ) ) {
$params["image_url"] = $array['image_url'];
}
$sql = "UPDATE {$this->table} SET `cat_name` = :cat_name, `cat_url` = :cat_url, `image_url` = :image_url, `parent` = :parent_cat WHERE `id` = :id";