Switched from mysql to mysqli