updated from mysql to mysqli