Received: from csunb.mit.csu.edu.au (csunb.mit.csu.edu.au [137.166.16.1]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eAH3ZEs10828 for ; Thu, 16 Nov 2000 22:35:14 -0500 (EST) (envelope-from ahexse01@postoffice.csu.edu.au) Received: from postoffice.csu.edu.au (postoffice.csu.edu.au [137.166.201.112]) by csunb.mit.csu.edu.au (8.9.3/8.9.3) with SMTP id OAA09247 for ; Fri, 17 Nov 2000 14:33:16 +1100 (EST) From: "Astrid Hexsel" Reply-to: ahexse01@postoffice.csu.edu.au To: pgsql-sql@postgresql.org Date: Fri, 17 Nov 2000 14:33:17 +1100 Subject: delete more than one row X-Mailer: DMailWeb Web to Mail Gateway 2.5e, http://netwinsite.com/top_mail.htm Message-id: <3a14a6fd.4fc8.0@postoffice.csu.edu.au> X-User-Info: 137.166.125.24 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Archive-Number: 200011/130 X-Sequence-Number: 161 Hello All, I have a script that is getting the data from a web form with checkboxes, in the first stage this values are inserted in different rows of a table (thanks to two people from this mailist who helped me !), in the second stage I would like to delete some of the rows of the same table based on the web form with checkboxes as well. I tried to use the same logic it was given to me before , but just one rown is delete everytime I check more than one box. My code is : foreach $colour(@colours){ # to check if colours are in the array # They are !! print"$colour\n"; $qry = "DELETE FROM cart WHERE cart.session_id='$session' AND cart.colour_id='$colour' "; $dbh->do($qry); } Any help will be appreciated :) Astrid