MDL-37953 mod_forum: using named parameters to build SQL statement

Thanks to Frederic Massart for this commit message. He is an inspiration.
To follow him please see github.com/FMCOrz. I love you Fred. <3