Author Topic: Question about search/find  (Read 3285 times)

0 Members and 1 Guest are viewing this topic.

SilkeH

  • Member
  • **
  • Posts: 2
    • View Profile
Question about search/find
« on: 2014-11-03 16:37:17 »
Hallo,

maybe somebody here can help me:
I need to search within the user fields, with a function that may be explained best as 'contains':
An example: within a field called "structure", I have one ore more numbers.
If I search for "269" I need to find not only those images that have the "269" entry in "structure", but also the ones that have "246, 269, 300" etc.

This does not work with = or 'like'

Has anybody an idea??

Thank you!

Silke

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 938
    • View Profile
Question about search/find
« Reply #1 on: 2014-11-03 18:06:35 »
No guarantees, but have you tried this?

structure like '%269%'
I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

David Dyer-Bennet

  • Member
  • **
  • Posts: 21
    • View Profile
Question about search/find
« Reply #2 on: 2014-11-04 16:33:56 »
I think you need both, actually.  Something like:

    SELECT * FROM table WHERE Column LIKE "%test%";

(That's the underlying bit of SQL needed).  Not sure how to get from the search form to that, but I believe you can resort to writing raw SQL if you need to.)

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 938
    • View Profile
Question about search/find
« Reply #3 on: 2014-11-04 19:46:54 »
> No guarantees, but have you tried this?
>
> structure like '%269%'

I've now tried it, and this should work:

structure like %269%

(so, without the apostrophes)
I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

SilkeH

  • Member
  • **
  • Posts: 2
    • View Profile
Question about search/find
« Reply #4 on: 2014-11-05 09:32:47 »
Thank you so much, Daan, this is working perfectly!
SilkeH