问候下discuz的设计者们,这东西居然好意思拿出来开源,丢人不啊:
select @a:=(MAX(pid)+1) AS 'zuidaid' from forum_post_tableid;insert into forum_post_tableid VALUES(@a);select @a;