Moodle

Fix double quotes in SQL statements

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9
  • Component/s: Other
  • Labels:
    None
  • Database:
    Any
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

I'm getting some SQL erros. The main cause seems to be that some queries use double-quotes to enclose literals.

For example:

ERROR: column "site" does not exist<br /><br />SELECT id,courseid,userid,content,format,created,lastmodified,usermodified,publishstate FROM mdl_post WHERE userid=2 AND publishstate="site" AND module="notes" ORDER BY lastmodified DESC

in the note_list() function.

It would be interesting to fix this and to perform a quick review to detect-and-kill such quoting.

Ciao

Activity

Hide
Petr Škoda (skodak) added a comment -

fixed

Show
Petr Škoda (skodak) added a comment - fixed

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: