Issue Details (XML | Word | Printable)

Key: MDL-16669
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Petr Skoda
Reporter: Eloy Lafuente (stronk7)
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-14679

Make sql_substr() to accept parameters instead of simply returning function name

Created: 25/Sep/08 05:27 AM   Updated: 29/Oct/08 04:09 AM
Return to search
Component/s: Database SQL/XMLDB
Affects Version/s: 2.0
Fix Version/s: 2.0

Participants: Eloy Lafuente (stronk7) and Petr Skoda
Security Level: None
QA Assignee: Petr Skoda
Resolved date: 29/Oct/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
Until Moodle 2.0, the sql_substr() helper function (dmllib), is used without parameters at simply returns the "substring" function used for each DB.

Change this behaviour so it will look like:

$DB->sql_substr(string, from, len)

with len being optional.

- Implement it in new moodle_databases.
- Document it.
- Look for wrong usages in core.
- Add some tests, with and without len.

Ciao :-)

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda made changes - 28/Oct/08 09:17 PM
Field Original Value New Value
Assignee Eloy Lafuente (stronk7) [ stronk7 ] Petr ?koda [ skodak ]
Petr Skoda made changes - 29/Oct/08 12:11 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]