Moodle

Need an sql_position method

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7.6, 1.8.7, 1.9.3, 2.0
  • Fix Version/s: 1.7.6, 1.8.7, 1.9.3, 2.0
  • Component/s: Database SQL/XMLDB
  • Labels:
    None
  • Affected Branches:
    MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

Description

The standard SQL POSITION(needle IN haystack) for finding out if one string contains another does not work on MSSQL or Oracle. I need to use this syntax for part of MDL-15605, so we need a compatibility method.

Activity

Hide
Tim Hunt added a comment -

Method implemented, with a unit test. I have only tested on Oracle, I would be really grateful if you (Eloy) could run the new unit test (in testdml.php) on the other databases we support. Thanks.

Show
Tim Hunt added a comment - Method implemented, with a unit test. I have only tested on Oracle, I would be really grateful if you (Eloy) could run the new unit test (in testdml.php) on the other databases we support. Thanks.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: