marxjohnson / moodle-block_quickfindlist

Moodle block providing a quick method of searching users
http://moodle.org/mod/data/view.php?d=13&rid=2200
6 stars 15 forks source link

PATCH - No longer MySQL specific #9

Closed sensei-hacker closed 10 years ago

sensei-hacker commented 11 years ago

This fixes some MySQL-specific and erroneous quoting, so it now runs on other RDMS systems such as Microsoft SQL Server. More specifically:

Bound parameters are not quoted, as the binding handles that (uses ?, not "?").

String literals use single quotes, double quotes are for identifiers (MySQL accepts backticks for identifiers): http://www.savage.net.au/SQL/sql-2003-2.bnf.html#character%20string%20literal

Use Moodle's $DB->sql_concat rather than MySQL-specific CONCAT()

https://github.com/MorrisR2/moodle-block_quickfindlist/commit/e708c8063ba7e5941233834afcb4f06949bc0f4c

sensei-hacker commented 10 years ago

Closed as part of #13 batch "update for Moodle 2.7"