replaced calls to mysql_query for EE active record

replaced calls to mysql_query for EE active record to fix 'The mysql extension is deprecated' warning