$sql="SELECT gOrder + 1 FROM tblComment WHERE commentNo='{$parentNo}' AND status=1";
$gOrder=$this->getValue($sql,"gOrder + 1");
$sql="
UPDATE tblComment
SET gOrder=gOrder+1
WHERE commentGroup=(SELECT commentGroup FROM tblComment WHERE commentNo='{$parentNo}' AND status=1) AND gOrder > (SELECT gOrder + 1 FROM tblComment WHERE commentNo='{$parentNo}' AND status=1) AND status=1
WHERE commentGroup='{$commentGroup}' AND gOrder >= '{$gOrder}' AND commentNo <> '{$currentNo}' AND status=1