Added comments/documentation, some missing char escaping calls in SQL requests and verified that when searching by code, the passed string is actually a number and nothing else

Signed-off-by: Ruben <rubentin@gmail.com>
Merge branch 'master' of https://github.com/unok-kun/HTFM
Merge branch 'master' of https://github.com/unok-kun/HTFM