Skip site navigation (1) Skip section navigation (2)

delete more than one row

From: "Astrid Hexsel" <ahexse01(at)postoffice(dot)csu(dot)edu(dot)au>
To: pgsql-sql(at)postgresql(dot)org
Subject: delete more than one row
Date: 2000-11-17 03:33:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
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 !!


  $qry = "DELETE FROM cart
         WHERE cart.session_id='$session' AND                cart.colour_id='$colour'


 Any help will be appreciated :)

pgsql-sql by date

Next:From: Yves MartinDate: 2000-11-17 08:58:23
Subject: Like seems to fail !
Previous:From: Robert B. EasterDate: 2000-11-17 03:09:14
Subject: Re: fetching rows

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group