Hi, I'm having trouble with writing this statement as an INSERT function instead of UPDATE.
$sql = " UPDATE tbl_category
SET " . ($cat_parent_id == 0 ? "sub_cat_name = '$name'," : "cat_name = '$name',") .
"cat_description = '$description', cat_image = $catImage
WHERE cat_id = $catId";
Sorry if this is a noob question I'm still quite new with MySQL.
Thank you for any help.