本文整理汇总了PHP中EmployeePeer::getByFullName方法的典型用法代码示例。如果您正苦于以下问题:PHP EmployeePeer::getByFullName方法的具体用法?PHP EmployeePeer::getByFullName怎么用?PHP EmployeePeer::getByFullName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EmployeePeer
的用法示例。
在下文中一共展示了EmployeePeer::getByFullName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
//.........这里部分代码省略.........
$cl->setCounty(CountyPeer::getByName($client['client_county']));
// district
$cl->setDistrict(DistrictPeer::getByName($client['district_name']));
$cl->fromArray($client_fields, BasePeer::TYPE_FIELDNAME);
$cl->save($connection);
}
$connection->commit();
} catch (PropelException $e) {
$connection->rollBack();
throw $e;
}
// CLIENT SERVICES
// CLASSROOM
$query = 'SELECT * FROM tbl_classroom LEFT JOIN (tbl_client) ON (tbl_classroom.class_client_id = tbl_client.client_id)
LEFT JOIN (tbl_employee) ON (tbl_classroom.class_provider_id = tbl_employee.emp_id)
LEFT JOIN (tbl_services) ON (tbl_classroom.class_service_id = tbl_services.service_id)
LEFT JOIN (tbl_frequency) ON (tbl_classroom.class_freq_id = tbl_frequency.freq_id)';
$statement = $source->prepare($query);
$statement->execute();
$classrooms = $statement->fetchAll();
$connection->beginTransaction();
$c = new Criteria();
$c->add(ClientServicePeer::OBJECT_TYPE, ClientServicePeer::CLASSKEY_CLASSROOM);
try {
ClientServicePeer::doDelete($c, $connection);
foreach ($classrooms as $classroom) {
$this->logSection('classroom', 'reading service ' . $classroom['class_id']);
$cr_cl = new Classroom();
$cr_cl->setStartDate($classroom['class_start_date']);
$cr_cl->setEndDate($classroom['class_exp_date']);
$cr_cl->setChangeDate($classroom['class_chng_date']);
$cr_cl->setNotes($classroom['class_notes']);
// client
$cr_cl->setClient(ClientPeer::getByFullName($classroom['client_fn'], $classroom['client_ln']));
// employee
$cr_cl->setEmployee(EmployeePeer::getByFullName($classroom['emp_fn'], $classroom['emp_ln']));
// service
$cr_cl->setService(ServicePeer::getByName($classroom['service_title']));
// frequency
$cr_cl->setFrequency(FrequencyPeer::getByName($classroom['freq_title']));
// office
$cr_cl->setOffice(OfficePeer::getByName($classroom['class_location']));
$cr_cl->save($connection);
}
$connection->commit();
} catch (PropelException $e) {
$connection->rollBack();
throw $e;
}
// EI
$query = 'SELECT * FROM tbl_ei LEFT JOIN (tbl_client) ON (tbl_ei.ei_client_id = tbl_client.client_id)
LEFT JOIN (tbl_employee) ON (tbl_ei.ei_provider_id = tbl_employee.emp_id)
LEFT JOIN (tbl_services) ON (tbl_ei.ei_service_id = tbl_services.service_id)
LEFT JOIN (tbl_frequency) ON (tbl_ei.ei_freq_id = tbl_frequency.freq_id)
LEFT JOIN (tbl_icd9) ON (tbl_ei.ei_icd9_id = tbl_icd9.icd9_id)';
$statement = $source->prepare($query);
$statement->execute();
$eis = $statement->fetchAll();
$connection->beginTransaction();
$c = new Criteria();
$c->add(ClientServicePeer::OBJECT_TYPE, ClientServicePeer::CLASSKEY_EI);
try {
ClientServicePeer::doDelete($c, $connection);
foreach ($eis as $ei) {
$this->logSection('ei', 'reading service ' . $ei['ei_id']);
$ei_cl = new Ei();