本文整理汇总了PHP中DAO::setParameter方法的典型用法代码示例。如果您正苦于以下问题:PHP DAO::setParameter方法的具体用法?PHP DAO::setParameter怎么用?PHP DAO::setParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DAO
的用法示例。
在下文中一共展示了DAO::setParameter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTareasAbiertasYUsuarios
function getTareasAbiertasYUsuarios($request_id)
{
$daoHandler = new DAO();
$sql = "SELECT \ts.step_name, u.user_name\r\n\t\t\t\tFROM \tef_task t\r\n\t\t\t\tleft join ef_step s ON s.step_id = t.task_step AND s.step_flow = t.task_flow\r\n\t\t\t\tleft join ef_user u ON u.user_id = t.task_assignedto\r\n\t\t\t\tWHERE \t?\r\n\t\t\t\tAND \tt.task_request = '.{$request_id}.' \r\n\t\t\t\tAND \t(t.task_status is null or t.task_status = 'new' or t.task_status = '')\r\n\t\t\t\tAND \tt.task_flow = '" . $_SESSION["user_flow"] . "' ";
$daoHandler->resetDAO();
$daoHandler->setQuery($sql);
$daoHandler->setParameter('i', 1);
$reportData = $daoHandler->executeQuery();
return $reportData;
}
示例2: getDuracionCerradosPorCliente
function getDuracionCerradosPorCliente($cliente, $filtros)
{
$daoHandler = new DAO();
$flow = $_SESSION["user_flow"];
$sql = "SELECT AVG(a.delay) delay\r\n\t\t\t\tFROM(\tSELECT SUM(IF (d.date_end is not null, \r\n\t\t\t\t\t\t\t\t\t\t(-1*TIME_TO_SEC(TIMEDIFF(d.date_start, d.date_end))), \r\n\t\t\t\t\t\t\t\t\t\t(-1*TIME_TO_SEC(TIMEDIFF(d.date_start, NOW())))\r\n\t\t\t\t\t\t\t\t\t\t)) delay\r\n\t\t\t\t\t\tFROM ef_date d\r\n\t\t\t\t\t\tLEFT JOIN ef_step s ON d.date_flow = s.step_flow AND d.date_step = s.step_id\r\n\t\t\t\t\t\tLEFT JOIN \tef_request r2 ON d.date_request = r2.request_id\r\n\t\t\t\t\t\tLEFT JOIN \trc_reclamo r1 ON r1.ef_id = r2.request_id\r\n\t\t\t\t\t\tLEFT JOIN \trc_clase c ON r1.reclamo_clase = c.id\t\r\n\t\t\t\t\t\tWHERE \t\t(r2.request_status = 'closed' OR r2.request_status = 'cancelled')\r\n\t\t\t\t\t\tAND \t\tr1.cliente_nombre = '" . $cliente . "'\r\n\t\t\t\t\t\tAND \t\tr2.request_flow = " . $flow . "\r\n\t\t\t\t\t\t" . $filtros . "\r\n\t\t\t\t\t\tGROUP BY \td.date_request\r\n\t\t\t\t\t) a\r\n\t\t\t\tWHERE ? ";
$daoHandler->resetDAO();
$daoHandler->setQuery($sql);
$daoHandler->setParameter('i', 1);
$reportData = $daoHandler->executeQuery();
return $reportData[0]["delay"];
}
示例3: getStandardReportData
function getStandardReportData($filterHeaderArray, $outputType)
{
$daoHandler = new DAO();
require_once APP_BASEPATH . "/includes/Entities/Task/TaskCore.php";
require_once APP_BASEPATH . "/includes/Entities/User/UserCore.php";
require_once APP_BASEPATH . "/includes/Entities/FlowSettings/FlowSettingsCore.php";
require_once APP_BASEPATH . "/includes/Entities/RequestMetadata/RequestMetadataCore.php";
require_once $_SESSION["environment_path"] . "/customcode/RecepcionDocumentos/includes/Entities/DocumentoCabecera/DocumentoCabeceraCore.php";
require_once $_SESSION["environment_path"] . "/customcode/RecepcionDocumentos/includes/Entities/DocumentoLinea/DocumentoLineaCore.php";
require_once $_SESSION["environment_path"] . "/customcode/RecepcionDocumentos/includes/Entities/DistribucionCabecera/DistribucionCabeceraCore.php";
require_once $_SESSION["environment_path"] . "/customcode/RecepcionDocumentos/includes/Entities/DistribucionLinea/DistribucionLineaCore.php";
$flowSettingsHandler = new FlowSettingsCore();
$handlerTaskCore = new TaskCore();
$handlerRequestMetadataCore = new RequestMetadataCore();
$flow = $_SESSION["user_flow"];
$step = $flowSettingsHandler->getSettingValue($_SESSION["user_flow"], "RDE_STEP_PROC_CONTABLE");
$sql = "select\t\tCONCAT(docc.estab, '-', docc.ptoEmi, '-', docc.secuencial) documento,\r\n\t\t\t\t\t\t\tdocc.fechaEmision fecha,\r\n\t\t\t\t\t\t\tdocc.tipo_doc,\r\n\t\t\t\t docc.ruc ruc, \r\n\t\t\t\t docc.razonSocial nombre,\r\n\t\t\t\t docc.ef_id ef_id\r\n\r\n\t\t\t\tfrom \t\trde_documento docc\r\n\t\t\t\twhere \t\t?\r\n\t\t\t\tand \t\tdocc.tipo_doc = 'FAC' \t";
// Build filters
foreach ($filterHeaderArray as $headerRecord) {
if ($headerRecord["field_filtered"] == 1) {
if ($headerRecord["field_data_type"] != "date") {
$sql .= " AND " . $headerRecord["field_filter_string"] . " BETWEEN " . $headerRecord["field_min"] . " AND " . $headerRecord["field_max"] . " ";
} else {
$start_date = $headerRecord["field_min"] . " 00:00:00";
$end_date = $headerRecord["field_max"] . " 23:59:59";
}
}
}
$daoHandler->resetDAO();
$daoHandler->setQuery($sql);
$daoHandler->setParameter('i', 1);
$reportData = $daoHandler->executeQuery();
foreach ($reportData as &$record) {
$record["registrada_ats"] = "";
unset($record["ef_id"]);
}
return $reportData;
}
示例4: getStandardReportData
function getStandardReportData($filterHeaderArray, $outputType)
{
$daoHandler = new DAO();
require_once APP_BASEPATH . "/includes/Entities/Task/TaskCore.php";
require_once APP_BASEPATH . "/includes/Entities/User/UserCore.php";
require_once APP_BASEPATH . "/includes/Entities/FlowSettings/FlowSettingsCore.php";
require_once APP_BASEPATH . "/includes/Entities/RequestMetadata/RequestMetadataCore.php";
require_once $_SESSION["environment_path"] . "/customcode/RecepcionDocumentos/includes/Entities/DocumentoCabecera/DocumentoCabeceraCore.php";
require_once $_SESSION["environment_path"] . "/customcode/RecepcionDocumentos/includes/Entities/DocumentoLinea/DocumentoLineaCore.php";
require_once $_SESSION["environment_path"] . "/customcode/RecepcionDocumentos/includes/Entities/DistribucionCabecera/DistribucionCabeceraCore.php";
require_once $_SESSION["environment_path"] . "/customcode/RecepcionDocumentos/includes/Entities/DistribucionLinea/DistribucionLineaCore.php";
$flowSettingsHandler = new FlowSettingsCore();
$handlerTaskCore = new TaskCore();
$flow = $_SESSION["user_flow"];
$step = $flowSettingsHandler->getSettingValue($_SESSION["user_flow"], "RDE_STEP_PROC_CONTABLE");
$sql = "select\t\tCONCAT(docc.estab, '-', docc.ptoEmi, '-', docc.secuencial) factura,\r\n\t\t\t\t\t\t\tdocc.fechaEmision fecha,\r\n\t\t\t\t CONCAT(docc.ruc, ' - ', docc.razonSocial) proveedor,\r\n\t\t\t\t docc.id,\r\n\t\t\t\t docc.ef_id ef_id,\r\n\t\t\t\t docc.distribucion tipo_distribucion\r\n\r\n\t\t\t\tfrom \t\trde_documento docc\r\n\r\n\t\t\t\twhere \t\tef_id\t IN (\tselect\t\tdistinct(task_request)\r\n\t\t\t\t\t\t\t\t\t\t\tfrom\t\tef_task\r\n\t\t\t\t\t\t\t\t\t\t\twhere \t\ttask_flow = " . $_SESSION["user_flow"] . "\r\n\t\t\t\t\t\t\t\t\t\t\tand \t\ttask_step = ?\r\n\t\t\t\t\t\t\t\t\t\t\tand \t\ttask_status != 'closed')\r\n\r\n\t\t\t\tand \t\tdocc.tipo_doc = 'FAC' \t";
// Build filters
foreach ($filterHeaderArray as $headerRecord) {
if ($headerRecord["field_filtered"] == 1) {
if ($headerRecord["field_data_type"] != "date") {
$sql .= " AND " . $headerRecord["field_filter_string"] . " BETWEEN " . $headerRecord["field_min"] . " AND " . $headerRecord["field_max"] . " ";
} else {
$start_date = $headerRecord["field_min"] . " 00:00:00";
$end_date = $headerRecord["field_max"] . " 23:59:59";
}
}
}
$daoHandler->resetDAO();
$daoHandler->setQuery($sql);
$daoHandler->setParameter('i', $step);
$reportData = $daoHandler->executeQuery();
$returnArray = array();
foreach ($reportData as &$record) {
$returnArray[] = array('<div style="border: 3px solid #666;">' . getHtmlDistribucion($record) . '</div>');
}
return $returnArray;
}