HosipLan

Untitled

Apr 18th, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    /**
  2.     * @param int advisors id
  3.     * @return array
  4.     * @final
  5.     */
  6.     final public function getClients($advisors = null) {
  7.         $fluent = $this->db->select('id')
  8.         ->select("CONCAT_WS(' ', titul, prijmeni, jmeno) AS klient")
  9.         ->select("IFNULL(klient, nazevSpolecnosti) as klient")
  10.         ->select("CONCAT_WS(' ', id, klient) as klient")
  11.         ->from(self::clientsTable);
  12.  
  13.     if($advisors != null) {
  14.         $fluent->where('poradce = %i', $advisors);
  15.     }
  16.         return $fluent->OrderBy('zalozen DESC')->fetchPairs('id', 'klient');            
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment