migrated from mysql to mysqli

Signed-off-by: Alexander Book <redchrome@gmx.de>