В файле model.php пытаюсь модифицировать sql запрос, который производит выборку пользователей для списка
Вот этот
$sql = "SELECT u.id, u.login, u.nickname, u.icq, u.logdate as flogdate, u.rating, u.is_deleted as is_deleted, u.birthdate, u.rating, u.status as microstatus, p.city, p.cityid, p.state, p.region, p.country, p.countryid, p.karma, p.imageurl, p.gender as gender FROM cms_users u INNER JOIN cms_user_profiles p ON p.user_id = u.id {$r_join} WHERE u.is_locked = 0 AND u.is_deleted = 0 {$this->inDB->where} {$this->inDB->group_by} {$this->inDB->order_by}\n";
$sql = "SELECT u.id, u.login, u.nickname, u.icq, u.logdate as flogdate, u.rating, u.is_deleted as is_deleted, u.birthdate, u.rating, u.status as microstatus, p.city, p.cityid, p.state, p.region, p.country, p.countryid, p.karma, p.imageurl, p.where_from, p.gender as gender FROM cms_users u INNER JOIN cms_user_profiles p ON p.user_id = u.id {$r_join} WHERE u.is_locked = 0 AND u.is_deleted = 0 WHERE p.where_from = '$mars'
Вижу в списке пользователей, только марсиан.
Пытаюсь вывести в списке соседей с Луны.
$sql = "SELECT u.id, u.login, u.nickname, u.icq, u.logdate as flogdate, u.rating, u.is_deleted as is_deleted, u.birthdate, u.rating, u.status as microstatus, p.city, p.cityid, p.state, p.region, p.country, p.countryid, p.karma, p.imageurl, p.where_from, p.gender as gender FROM cms_users u INNER JOIN cms_user_profiles p ON p.user_id = u.id {$r_join} WHERE u.is_locked = 0 AND u.is_deleted = 0 AND p.where_from = '$mars' UNION SELECT u.id, u.login, u.nickname, u.icq, u.logdate as flogdate, u.rating, u.is_deleted as is_deleted, u.birthdate, u.rating, u.status as microstatus, p.city, p.cityid, p.state, p.region, p.country, p.countryid, p.karma, p.imageurl, p.where_from, p.gender as gender FROM cms_users u INNER JOIN cms_user_profiles p ON p.user_id = u.id {$r_join} WHERE u.is_locked = 0 AND u.is_deleted = 0 AND p.where_from = '$moon'
Где то при дальнейшей обработке результатов запроса, вероятно возникает какой то конфликт. Кто нибудь может подсказать в чем может быть проблема?