Use $modx->db->escape() instead mysql_real_escape_string()
Use $modx->db->getFullTableName() instead $modx->db->config['table_prefix']
Use base_url instead '/'
Use db->select() for query
Use while instead for
Delete unused field
Merge pull request #9 from Segr/develop

Small fixes