migrated and improved two functions regarding PDO stuff, refs #1287

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>