当前位置: 首页>>代码示例>>PHP>>正文


PHP paging::setSQL方法代码示例

本文整理汇总了PHP中paging::setSQL方法的典型用法代码示例。如果您正苦于以下问题:PHP paging::setSQL方法的具体用法?PHP paging::setSQL怎么用?PHP paging::setSQL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在paging的用法示例。


在下文中一共展示了paging::setSQL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: lower

        if (isset($_SESSION['id_sistema_filtro']) && $_SESSION['id_sistema_filtro'] != '-1') {
            $query .= " AND p.prob_area = " . $_SESSION['id_sistema_filtro'];
        }
        if (isset($_POST['search']) && !empty($_POST['search'])) {
            $query .= " AND lower(p.problema) like lower(('%" . noHtml($_POST['search']) . "%')) ";
        }
    }
}
//------------------------------------------------------------- FIM ALTERACAO --------------------------------------------------------------
$query .= " ORDER  BY s.sistema, p.problema";
$resultado = mysql_query($query) or die(TRANS('ERR_QUERY') . "<br>" . $query);
$registros = mysql_num_rows($resultado);
if (isset($_GET['LIMIT'])) {
    $PAGE->setLimit($_GET['LIMIT']);
}
$PAGE->setSQL($query, isset($_GET['FULL']) ? $_GET['FULL'] : 0);
if (!isset($_GET['action']) && empty($_POST['submit'])) {
    $PAGE->execSQL();
    //print "<TR><TD bgcolor='".BODY_COLOR."'><a href='".$_SERVER['PHP_SELF']."?action=incluir&cellStyle=true'>Incluir novo tipo de Problema</a></TD></TR>";
    print "<TR><TD><input type='button' class='button' id='idBtIncluir' value='" . TRANS('BT_NEW_RECORD', '', 0) . "' onClick=\"redirect('" . $_SERVER['PHP_SELF'] . "?action=incluir&cellStyle=true');\"></TD></TR>";
    print "<tr>" . "<td colspan='4'>" . "<input type='text' class='text' name='search' id='idSearch' value='" . $search . "'>&nbsp;";
    //------------------------------------------------------------- INICIO ALTERACAO --------------------------------------------------------------
    if ($OPERADOR_AREA) {
        $qryarea = "SELECT sis_id, sistema FROM sistemas WHERE sis_id = " . $_SESSION['s_area'] . " ORDER BY sistema";
    } else {
        $qryarea = "SELECT sis_id, sistema FROM sistemas ORDER BY sistema";
    }
    $execarea = mysql_query($qryarea);
    print "<SELECT class='select' name='id_sistema' size='1'>";
    print "<option value='-1'>" . TRANS('OCO_SEL_AREA') . "</option>";
    while ($rowArea = mysql_fetch_array($execarea)) {
开发者ID:JusCes,项目名称:ocomonv3,代码行数:31,代码来源:problemas.php

示例2: in

		}
	}

        $query = $QRY["ocorrencias_full_ini"]." WHERE s.stat_painel in (2) and a.sis_id ='7'";

	$resultado = mysql_query($query);
        $linhas = mysql_num_rows($resultado);

	if (isset($_GET['LIMIT']))
		$PAGE->setLimit($_GET['LIMIT']);

	if (isset($_GET['FULL'])){
		$_SESSION['s_paging_full'] = $_GET['FULL'];
	}

	$PAGE->setSQL($query,$_SESSION['s_paging_full']);
	$PAGE->execSQL();

        if ($linhas == 0) {
        	echo mensagem('Não existe nenhuma ocorrência pendente no sistema');
        	exit;
        } else
        if ($linhas>1)
        	print "<TR><TD><b>Ocorrências&nbsp;<font color ='red'>não atendidas</font> pela a Área de Sistemas de Informação.".
        			"&nbsp;Ordenar por&nbsp;".$_SESSION['TEXTO_ORDER'].".</B></TD></TR>";
        else
	       print "<TR><TD  class='line' ><B>Existe&nbsp;apenas 1 ocorrência".
				"&nbsp;<font color='red'>pendênte</font>".
				"&nbsp;no sistema.</B></TD></TR>";
        //print "</TD>";
开发者ID:JusCes,项目名称:ocomonv3,代码行数:30,代码来源:lista.php


注:本文中的paging::setSQL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。