我在Zend Framework 2中工作。 如何从此查询中仅获取 jobtitle 的唯一值?
$jobselect = $jobstable->select()
->setIntegrityCheck(false)
->from($jobsname, array("$jobsname.title as jobtitle", "$jobsname.company as company", "$storagename.storage_path as companylogo", "$jobsname.location as location"))
->join($storagename, "$storagename.parent_id = $jobsname.job_id")
->where("$storagename.parent_type = ?", "job")
->where("$storagename.type = ?", "thumb.icon")
->where("$jobsname.user_id = ?", 244);
答案 0 :(得分:0)
->where("$jobsname.user_id = ?", 244)
-group("jobtitle");