CREATE PROCEDURE [dbo].[spUpdateForumBasic]
	@frm_id     int,
	@frm_name	varchar(255),
	@frm_desc	text,
	@frm_link	varchar(255),
	@frm_image	varchar(255),
	@frm_type	int,
	@frm_status	int,
	@frm_order	int
AS
BEGIN
	if (@frm_order > 0)
	BEGIN
		UPDATE tblForum SET 
			forum_name = @frm_name,
			forum_desc = @frm_desc,
			forum_link = @frm_link,
			forum_image = @frm_image,
			forum_type = @frm_type,
			forum_status = @frm_status,
			forum_order = @frm_order
		WHERE forum_id = @frm_id;
	END
	ELSE
	BEGIN
		UPDATE tblForum SET 
			forum_name = @frm_name,
			forum_desc = @frm_desc,
			forum_link = @frm_link,
			forum_image = @frm_image,
			forum_type = @frm_type,
			forum_status = @frm_status
		WHERE forum_id = @frm_id;
	END	
END