本文整理汇总了PHP中sql::sqlFetchArray方法的典型用法代码示例。如果您正苦于以下问题:PHP sql::sqlFetchArray方法的具体用法?PHP sql::sqlFetchArray怎么用?PHP sql::sqlFetchArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sql
的用法示例。
在下文中一共展示了sql::sqlFetchArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explode
$cadenaMailMaster = '';
$master = explode("|", $_POST['cadena']);
$id_master = 0;
$id_mail = 0;
$variables = explode(",", $_POST['cadena']);
$variables2 = explode("AND", $variables[3]);
$insert = '';
$values = '';
$idObjectMap = explode("=", $master[3]);
$unidadesVariables = explode(",", $master[2]);
$sql_master = "INSERT INTO ALERT_XP_MASTER\n\t\t\t\t (COD_CLIENT,\n\t\t\t\t NAME_ALERT,\n\t\t\t\t ACTIVE,\n\t\t\t\t VIGENTE,\n\t\t\t\t ALARM_EXPRESION,\n\t\t\t\t TYPE_EXPRESION,\n\t\t\t\t HORARIO_FLAG_LUNES,\n\t\t\t\t HORARIO_FLAG_MARTES,\n\t\t\t\t HORARIO_FLAG_MIERCOLES,\n\t\t\t\t HORARIO_FLAG_JUEVES,\n\t\t\t\t HORARIO_FLAG_VIERNES,\n\t\t\t\t HORARIO_FLAG_SABADO,\n\t\t\t\t HORARIO_FLAG_DOMINGO,\n\t\t\t\t HORARIO_HORA_INICIO,\n\t\t\t\t HORARIO_HORA_FIN,\n\t\t\t\t COD_USER_CREATE,\n\t\t\t\t NICKNAME_USER_CREATE,\n\t\t\t\t FECHA_CREATE)\n\t\t\t\t VALUES (" . $idCliente . "," . stripslashes($master[0]) . ",'" . date('Y-m-d H:m:s') . "')";
$qry_master = $db3->sqlQuery($sql_master);
if ($qry_master) {
$sql_v = "SELECT LAST_INSERT_ID() AS INDX FROM ALERT_XP_MASTER";
$query_v = $db3->sqlQuery($sql_v);
$row_v = $db3->sqlFetchArray($query_v);
$id_master = $row_v['INDX'];
$cadenaMail = $idCliente . ',"' . $master[1] . '"';
$sql_mail = "INSERT INTO ALERT_XP_EMAIL\n\t\t\t\t (COD_CLIENT,CORREO_ELECTRONICO)\n\t \t\t\t VALUES (" . $cadenaMail . ")";
$qry_mail = $db3->sqlQuery($sql_mail);
if ($qry_mail) {
$sql_w = "SELECT LAST_INSERT_ID() AS INDX2 FROM ALERT_XP_EMAIL";
$query_w = $db3->sqlQuery($sql_w);
$row_w = $db3->sqlFetchArray($query_w);
$id_mail = $row_w['INDX2'];
/********************************************************/
$con1 = '';
/*for($v=0;$v<count($variables2);$v++){
$con1 = explode("=", stripslashes(str_replace('>','',str_replace('"','',$variables2[$v]))));
if($insert === ''){
$insert = $con1[0];
示例2: sql
**/
$db = new sql($config_bd['host'], $config_bd['port'], $config_bd['bname'], $config_bd['user'], $config_bd['pass']);
$db3 = new sql($config_bd3['host'], $config_bd3['port'], $config_bd3['bname'], $config_bd3['user'], $config_bd3['pass']);
if (!$userAdmin->u_logged()) {
echo '<script>window.location="index.php?m=login"</script>';
}
$tpl->set_filenames(array('mExpresiones' => 'tExpresiones'));
$idCliente = $userAdmin->user_info['ID_CLIENTE'];
$idUsuario = $userAdmin->user_info['ID_USUARIO'];
$nombreUsuario = $userAdmin->user_info['NOMBRE_COMPLETO'];
//******************************* Eventos
$sql_eventos = "SELECT COD_EVENT,DESCRIPTION FROM ADM_EVENTOS WHERE ID_CLIENTE =" . $idCliente;
$qry_eventos = $db->sqlQuery($sql_eventos);
$cnt = $db->sqlEnumRows($qry_eventos);
if ($cnt > 0) {
while ($row_evento = $db->sqlFetchArray($qry_eventos)) {
$tpl->assign_block_vars('eventos', array('CLV_EVENTO' => $row_evento['COD_EVENT'], 'DESCRIPCION' => $Functions->codif($row_evento['DESCRIPTION'])));
}
}
//******************************* Prioridad
$sql_prioridad = "SELECT * FROM DSP2_PRIORIDAD";
$qry_prioridad = $db->sqlQuery($sql_prioridad);
$cnt2 = $db->sqlEnumRows($qry_prioridad);
if ($cnt2 > 0) {
while ($row_prioridad = $db->sqlFetchArray($qry_prioridad)) {
$tpl->assign_block_vars('prioridades', array('CLV_PRIORIDAD' => $row_prioridad['ID_PRIORIDAD'], 'DESCRIPCION' => $Functions->codif($row_prioridad['DESCRIPCION'])));
}
}
//************************** por defualt se cargan los PDI
$sql_tipo = "SELECT ID_OBJECT_MAP,DESCRIPCION FROM \tADM_GEOREFERENCIAS WHERE TIPO = 'G' AND ID_CLIENTE =" . $idCliente;
$qry_tipo = $db->sqlQuery($sql_tipo);
示例3: sql
$db = new sql($config_bd['host'], $config_bd['port'], $config_bd['bname'], $config_bd['user'], $config_bd['pass']);
$db3 = new sql($config_bd3['host'], $config_bd3['port'], $config_bd3['bname'], $config_bd3['user'], $config_bd3['pass']);
if (!$userAdmin->u_logged()) {
echo '<script>window.location="index.php?m=login"</script>';
}
$idCliente = $userAdmin->user_info['ID_CLIENTE'];
$idUsuario = $userAdmin->user_info['ID_USUARIO'];
$select = '';
//******************************* tipos
$opcion = '';
if ($_POST['tip_g'] === 'G') {
$opcion = 'Elegir PDI';
}
if ($_POST['tip_g'] === 'C') {
$opcion = 'Elegir Geocerca';
}
if ($_POST['tip_g'] === 'R') {
$opcion = 'Elegir Ruta';
}
$sql_tipo = "SELECT ID_OBJECT_MAP,DESCRIPCION FROM \tADM_GEOREFERENCIAS WHERE TIPO = '" . $_POST['tip_g'] . "' AND ID_CLIENTE =" . $idCliente;
$qry_tipo = $db->sqlQuery($sql_tipo);
$cnt = $db->sqlEnumRows($qry_tipo);
if ($cnt > 0) {
$select = '<select style=" width:100px;" id="TiposPDIGCRSI" onChange="cambiaPDIcod(this.value);">';
$select .= '<option value="-1">' . $opcion . '</option>';
while ($row_tipo = $db->sqlFetchArray($qry_tipo)) {
$select .= '<option value="' . $row_tipo['ID_OBJECT_MAP'] . '">' . $row_tipo['DESCRIPCION'] . '</option>';
}
$select .= '</select>';
}
echo $select;