pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Astrid Hexsel <ahexse01@postoffice.csu.edu.au>
To: pgsql-sql@postgresql.org
Subject: delete more than one row
Date: Fri, 17 Nov 2000 14:33:17 +1100
Message-ID: <3a14a6fd.4fc8.0@postoffice.csu.edu.au> (raw)

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    









Message-ID: <3a14a6fd.4fc8.0@postoffice.csu.edu.au>
Permalink:  ../3a14a6fd.4fc8.0@postoffice.csu.edu.au/
Also on:    postgresql.org/message-id/3a14a6fd.4fc8.0@postoffice.csu.edu.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: ahexse01@postoffice.csu.edu.au
  Subject: Re: delete more than one row
  In-Reply-To: <3a14a6fd.4fc8.0@postoffice.csu.edu.au>
  References: <3a14a6fd.4fc8.0@postoffice.csu.edu.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox