Jump to content

btcleigh

Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://boffswana.com

Profile Information

  • Gender
    Not Telling

btcleigh's Achievements

Newbie

Newbie (2/6)

0

Reputation

  1. That's awesome Ryan, thanks for adding that in.
  2. Yep, been digging around a bit in the guts to figure out how the selectors have been implented. Didn't quite put 2 and 2 together though and figure out it's intended use for matching at the end of text. In any case, for the code example above it's working fine. BTW, at the moment ^= is doing the same as *=, but $= has its own case. To try and hack as little as possible I'm going to add a separate handler based on your suggestion of %= into DatabaseQuerySelectFulltext.match to implement the LIKE '%text%'. I should probably add an exception handler to my little search routine to catch the 'Unimplmented operator' WireException in case the core gets updated and my %= case isn't there any more. Thanks for the info Ryan. Might do a bit of testing on how %= works in more complex selectors and get a patch organised.
  3. When attempting to change some details on the account settings page in the forum, I receive this message. The page requires users to enter the Current Password when making changes, and I've gone to the point of copy+pasting my password in to ensure it's not a typo. Anyone else having this issue?
  4. Somewhat related to this discussion, in addition to ~= and *= there's also the $= operator, which runs a LIKE instead of MATCH. For a site search (where modifying the MySQL index isn't an option) I'm intending to use something along the lines of: $grabbedPages = $page->children("title~=" . $term); if($grabbedPages->count() == 0){ $grabbedPages = $page->children("title$=" . $term); } So first it searches using the FULLTEXT index, but if there's no matches then it jumps in and does a slow LIKE match. The problem I'm having is in core on line 72 is: $query->where("$tableField LIKE '%$v'"); Which isn't ideal for searches, it's preferable for it to be along the lines of $query->where("$tableField LIKE '%$v%'"); I was curious if anyone knows if there's a dependancy on the line somewhere else in core that would break if it changed (did a quick flip through the core but hadn't found anything else relying on $=). Or for that matter any modules that could be disrupted. Cheers
×
×
  • Create New...