search for: ilike

Displaying 20 results from an estimated 25 matches for "ilike".

Did you mean: like
2006 Mar 13
7
Wilcard search
...am unsure on how to search for all results that contain my search string; here''s what I''ve got: def search @products = Product.find(:all, :conditions => "date_available < now()", :conditions => [ "title ilike ?", @params[:search]], :order => "title desc") end It works, but only if I provide a full match to the title - how can I do "title ilike ''%''?''%'' ? Also, is this method sql-injection safe ? Last, but not least - h...
2011 Nov 26
1
32 vs 64 bit difference?
I've spent the last few hours baffled by a test suite inconsistency. The exact same library code gives slightly different answers on the home and work machines - found in my R CMD check run. I've recopied the entire directory to make sure it's really identical code. The data set and fit in question has a pretty flat "top" to the likelihood. I put print statements in to
2006 Mar 10
5
case insensitive search
I am having trouble with a simple gallery search. I type in a segment of the address and i only seem to be getting results if I use the correct case. This is in my Gallery controller: def search @gallery = Gallery.find(:all, :include => :property, :conditions => "address LIKE ''%#{@params[:keywords]}%''") end On a different note: I am having
2013 Mar 05
4
searching model and has_one association
...: User, field "mundane_name" user has_one :instructor_profile (may or may not exist) instructor_profile, field "sca_name" belongs_to :user I would like to craft a search on these fields, which is effectively this, but in one go: matching_users = User.where("mundane_name ILIKE ?", "%#{target}%") matching_profiles = InstructorProfile.where("sca_name ILIKE ?", "%#{target}%").map(&:user) (matching_users + matching_profiles).uniq However, I''m having problems formulating the query. Not all users have a profile, so some of the...
2006 Jun 19
2
fuzzy search
This may be offtopic to Rails, but what are people doing to find records based on fuzzy string matches? For example, if you wanted to find a Person with name "David Heinemeier Hansson" but searched using the string "Dave Hansson". Currently I am find_by_sql that calls the PostgreSQL function "levenshtein(string1, string2)" which returns results with a score
2006 Apr 20
7
Rails + postgres case insensitive searches.
Hello all I am wondering how rails handles case sensitivity in databases. If I do a Person.find_all_by_name("tim") in mysql I would expect to get tim, TIm, and Tim. Do I only get tim in postgres? How do other people deal with this? Do you resort to find_by_sql for all your postgres queries to get case insensitive results?
2007 Feb 15
1
mongrel process stopped listening but "phantom thread" still going
...them seem to have threads running, that are waiting for data on a socket that''s been disconnected from the apache balancer long ago. process 27457 has been sent a USR2 signal, and is waiting for its thread to die: [xxx at app04 config]$ /usr/sbin/lsof | grep 27457 [snip] ruby 27457 ilike 28u IPv4 214673805 TCP *:49242 (LISTEN) ruby 27457 ilike 29u IPv4 214673810 TCP app04:49244->10.1.2.10:mysql (ESTABLISHED) [snip] Here''s the strace of what it''s actually doing: [ilike at app04 config]$ strace -p 27457 Proc...
2013 Apr 19
0
Question marks in SQL string literals
Hi all! Recently I discovered that AR tries to treat question marks inside SQL string literals as parameters, however this behaviour shows in very rare cases, for example (very odd, but...): User.where("NOT EXISTS (#{ Comment.where(''user_id = users.id AND body ILIKE ?'', ''%?'').to_sql }) AND created_at > ?", Date.yesterday).to_sql It will fail, because inner SQL will contain qmark inside of literal, which AR will count as query parameter (https://github.com/rails/rails/blob/master/activerecord/lib/active_record/sanitization...
2006 Mar 29
3
MySQL in dev, Postgres in prod - differences in "LIKE" query
Hi everyone, I run MySQL in my dev environment, but Postgres in my production environment (out of necessity). I''m having trouble finding a way to write a query with a LIKE condition that is supported as case insensitive in both databases. Right now, I have this: @query = "m" # for example @people = Person.find(:all, :conditions => ["last_name LIKE ?", @query +
2013 Mar 05
1
Reading Wyoming radiosonde data files with RadioSonde package
Hi, I need to do some analysis on historic daily radiosonde data I download from the Wyoming Univ. web page ( http://weather.uwyo.edu/upperair/sounding.html). I am trying to use the RadioSonde package (V 1.3), but the format of the files from Wyoming don't match what RadioSonde is expecting. Has anyone used the Radiosonde package on the Wyoming data? Here is a sample of the Wyoming file
2006 Jan 09
3
Pagination :conditions not working - MySQL v. PostgreSQL, Rails abstraction v. embedded SQL
Hi everyone, I have this code: @person_pages, @people = paginate :person, :per_page => 20, :conditions => [ "username LIKE ? OR first_name LIKE ? OR last_name LIKE ? OR preferred_name LIKE ?", "%" + params[:q].downcase + "%", "%" + params[:q].downcase + "%",
2017 Jun 06
0
integrating 2 lists and a data frame in R
Reproducible example, please. -- In particular, what exactly does C look ilike? (You should know this by now). -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Jun 5, 2017 at 6:45 PM, Bogdan Tanasa <tana...
2017 Jun 06
4
integrating 2 lists and a data frame in R
...n1 n2 n3 n4 m1 100 200 - - m2 - - - - m3 - - 300 - m4 - - - - m5 - - - - thank you ! On Mon, Jun 5, 2017 at 6:57 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > Reproducible example, please. -- In particular, what exactly does C look > ilike? > > (You should know this by now). > > -- Bert > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > >...
2017 Jun 06
2
integrating 2 lists and a data frame in R
Dear all, please could you advise on the R code I could use in order to do the following operation : a. -- I have 2 lists of "genome coordinates" : a list is composed by numbers that represent genome coordinates; let's say list N : n1 n2 n3 n4 and a list M: m1 m2 m3 m4 m5 2 -- and a data frame C, where for some pairs of coordinates (n,m) from the lists above, we have a
2017 Jun 06
0
integrating 2 lists and a data frame in R
...- - > m3 - - 300 - > m4 - - - - > m5 - - - - > > thank you ! > > > On Mon, Jun 5, 2017 at 6:57 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > >> Reproducible example, please. -- In particular, what exactly does C look >> ilike? >> >> (You should know this by now). >> >> -- Bert >> Bert Gunter >> >> "The trouble with having an open mind is that people keep coming along >> and sticking things into it." >> -- Opus (aka Berkeley Breathed in his "Bloom Count...
2017 Jun 06
2
integrating 2 lists and a data frame in R
...4 - - - - >> m5 - - - - >> >> thank you ! >> >> >> On Mon, Jun 5, 2017 at 6:57 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: >> >>> Reproducible example, please. -- In particular, what exactly does C look >>> ilike? >>> >>> (You should know this by now). >>> >>> -- Bert >>> Bert Gunter >>> >>> "The trouble with having an open mind is that people keep coming along >>> and sticking things into it." >>> -- Opus (aka Ber...
2017 Jun 06
1
integrating 2 lists and a data frame in R
...- - > m3 - - 300 - > m4 - - - - > m5 - - - - > > thank you ! > > > On Mon, Jun 5, 2017 at 6:57 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > >> Reproducible example, please. -- In particular, what exactly does C look >> ilike? >> >> (You should know this by now). >> >> -- Bert >> Bert Gunter >> >> "The trouble with having an open mind is that people keep coming along >> and sticking things into it." >> -- Opus (aka Berkeley Breathed in his "Bloom Count...
2009 Aug 28
2
Association extension method
In my application a user working at a dropzone can manipulate transactions against customer accounts. Here''s my models: class Transaction < ActiveRecord::Base belongs_to :account end class Account < ActiveRecord::Base belongs_to :dropzone has_many :transactions end class Dropzone < ActiveRecord::Base has_many :transactions, :through => :accounts do def
2012 Jun 06
1
Default value for case sensitive on uniqueness validator
Hello, The uniqueness validator was always case sensitive but that seems wrong because we want uniqueness validations to be insensitive in most of the time. Do not make more sense be insensitive by default and set sensitive only where it should be? We are migrating a lot of big applications from mysql to postgresql here and we are setting case sensitive to false on **all** uniqueness
2017 Jun 06
0
integrating 2 lists and a data frame in R
...> >> > >> thank you ! > >> > >> > >> On Mon, Jun 5, 2017 at 6:57 PM, Bert Gunter <bgunter.4567 at gmail.com> > wrote: > >> > >>> Reproducible example, please. -- In particular, what exactly does C > look > >>> ilike? > >>> > >>> (You should know this by now). > >>> > >>> -- Bert > >>> Bert Gunter > >>> > >>> "The trouble with having an open mind is that people keep coming along > >>> and sticking things into it...