Fix wrong function used
(bbc8bea in elkarte core)

Signed-off-by: Norv <a.w.norv@gmail.com>
Variable initialized in the wrong place

Signed-off-by: Norv <a.w.norv@gmail.com>
Correct name of the db method.

Signed-off-by: Norv <a.w.norv@gmail.com>
Merge pull request #5 from norv/fix

Quick fixes made on site.