Received: from zukerman-1.dsl.speakeasy.net (zukerman-1.dsl.speakeasy.net [216.254.75.142]) by hub.org (8.10.1/8.10.1) with ESMTP id e6RF5bA30430 for ; Thu, 27 Jul 2000 11:05:37 -0400 (EDT) Received: from (matt.w80.math-hat.com) [216.254.75.141] by zukerman-1.dsl.speakeasy.net with esmtp (Exim 3.12 #1 (Debian)) id 13HpDz-0000RV-00; Thu, 27 Jul 2000 11:05:27 -0400 Received: from zukerman by matt.w80.math-hat.com with local (Exim 3.12 #1 (Debian)) id 13HpE7-0000ll-00 for ; Thu, 27 Jul 2000 11:05:35 -0400 To: Subject: Re: Conditional rule? References: <87k8e78yg9.fsf@matt.w80.math-hat.com> <003601bff7d9$18cdd610$74b5f8c2@wkst6> From: Itai Zukerman Date: 27 Jul 2000 11:05:35 -0400 In-Reply-To: "=?iso-8859-1?q?Andr=E9_N=E6ss?="'s message of "Thu, 27 Jul 2000 16:43:57 +0200" Message-ID: <87g0ov8vgg.fsf@matt.w80.math-hat.com> Lines: 13 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200007/258 > I.e. "On an insert to news, if new.publish is not null, insert the new > post's id into news_unpublished. How about: CREATE RULE newsrule AS ON INSERT TO news DO INSERT INTO news_unpublished SELECT NEW.id WHERE NEW.publishtime IS NOT NULL -itai