- $res = XDB::iterRow("SELECT j.id, j.jobid, je.name, j.sectorid, j.subsectorid, j.subsubsectorid,
- s.name, j.description, j.email, j.email_pub, j.url, j.pub,
- je.acronym, je.url, je.email,
- aw.accuracy, aw.text, aw.postalText, aw.postalCode, aw.localityId,
- aw.subAdministrativeAreaId, aw.administrativeAreaId, aw.countryId,
- aw.latitude, aw.longitude, aw.pub, aw.updateTime,
- aw.north, aw.south, aw.east, aw.west,
- ah.accuracy, ah.text, ah.postalText, ah.postalCode, ah.localityId,
- ah.subAdministrativeAreaId, ah.administrativeAreaId, ah.countryId,
- ah.latitude, ah.longitude, ah.pub, ah.updateTime,
- ah.north, ah.south, ah.east, ah.west
- FROM profile_job AS j
- LEFT JOIN profile_job_enum AS je ON (j.jobid = je.id)
- LEFT JOIN profile_job_subsubsector_enum AS s ON (s.id = j.subsubsectorid)
- LEFT JOIN profile_addresses AS aw ON (aw.pid = j.uid AND aw.type = 'job'
- AND aw.id = j.id)
- LEFT JOIN profile_addresses AS ah ON (ah.jobid = j.jobid AND ah.type = 'hq')
- WHERE j.uid = {?}
- ORDER BY j.id",
- S::i('uid'));