Guest User

Untitled

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