- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
private function getExperts($where = '') {
if ($where) {
$where = "WHERE $where";
}
$query = "SELECT * FROM $this->expertsTable $where";
$experts = self::$DB->select($query);
// workarround кривой структуры бд
// выбрасываем повторяющихся экспертов
$experts_unique = array();
foreach($experts as $expert)
{
$key = md5($expert['expertName'].$expert['photo'].$expert['text']);
if(!isset($experts_unique[$key]))
$experts_unique[$key] = $expert;
}
return array_values($experts_unique);
}
yasenhui 29.07.2011 12:47 # 0