when this execute it will delete only one record from the database which
it get first. It will keep other records same.Is there any alternative
to delete all records based this method.
i tried with people=People.find(:all, :conditions=>["id=?",params[:id]])
but result is same.
when this execute it will delete only one record from the database which
it get first. It will keep other records same.Is there any alternative
to delete all records based this method.
i tried with people=People.find(:all, :conditions=>["id=?",params[:id]])
but result is same.
This doesn't really make sense to me. There is only one record for a
given value of the id column (or rather rails assumes that id is your
primary key) so what were you expecting?
Frederick Cheung wrote:
>> to delete all records based this method.
>> i tried with people=People.find(:all, :conditions=>["id=?",params[:id]])
>> but result is same.
> This doesn't really make sense to me. There is only one record for a
> given value of the id column (or rather rails assumes that id is your
> primary key) so what were you expecting?
> Fred
I want all records base on query which i have written in
people=People.find(:all, :conditions=>["id=?",params[:id]])
i am getting only one record not all records ...
There is only ever one such record because the primary key is unique
(by definition).