Delete records from table which matches the data in an array?
Posted
by Maxsy
on Stack Overflow
See other posts from Stack Overflow
or by Maxsy
Published on 2010-03-21T19:26:22Z
Indexed on
2010/03/21
19:31 UTC
Read the original article
Hit count: 291
I have a table of 2 fields. Word and timestamp. Then i have this array which contains some words. How do i delete all the records in the table which match with the words in the array? Suppose that the model is called "Word".
Any ideas on how to achieve this? maybe loop through the array and run some destroy queries. Can anybody direct me here? thanks
© Stack Overflow or respective owner