FAQ Database Discussion Community


codeigniter filter database

codeigniter,filter,model,conditionals
i have a few checkboxes that filter my elements from a database but i don't know how to apply a filter like price with a min value and a max value, since from my view i can pass to the controller only one value of my inputs For example: i...

ruby a = b || c if b is undefined

ruby-on-rails,ruby,conditionals
Working with a large dataset. Generally the data is good but for a few entries a value is missing. I want my seed to: player.nationality = dataset_row.player_nationality or 'US' if dataset_row.player_nationality is undefined Also, looking for a one-liner solution. thanks!...