I am trying to create a find method. That should find all konkurrencer that have the tid “1 min” or “2 min” and the form is “Nyhedsbrev”.
I have tried something like this:
Konkurrancer.where("tid = ? or ? and form = ?", "2 min", "1 min", "Nyhedsbrev")
It doesn’t work. It only finds all konkurrencer where the form is Nyhedsbrev.
Perhaps this works as intended.
Other than that, the ‘OR’ syntac you are trying to use is written like this in SQL:
Notice that for the ‘OR’ condition you still need to list the column name again.