delete more than one row

Поиск
Список
Период
Сортировка
От Astrid Hexsel
Тема delete more than one row
Дата
Msg-id 3a14a6fd.4fc8.0@postoffice.csu.edu.au
обсуждение исходный текст
Список 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
!!
               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    








В списке pgsql-sql по дате отправления:

Предыдущее
От: "Robert B. Easter"
Дата:
Сообщение: Re: fetching rows
Следующее
От: Arnaud Vandyck
Дата:
Сообщение: how many rows? [was Re: fetching rows]