updated db model with advanced MySQLi functions. Does not work.