本文整理汇总了PHP中Sql::limit方法的典型用法代码示例。如果您正苦于以下问题:PHP Sql::limit方法的具体用法?PHP Sql::limit怎么用?PHP Sql::limit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sql
的用法示例。
在下文中一共展示了Sql::limit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listar
public function listar($_prQuery = '', $_prStart = 0, $_prLimit = 0)
{
$sb = new StringBuilder();
$Sql = new Sql();
$Sql->limit($_prStart, $_prLimit);
$sb->append("SELECT *,");
$sb->append("codigo_usr as codigo,");
$sb->append("nome_usr as descricao");
$sb->append("FROM " . T_USUARIO);
if (trim($_prQuery) != '') {
$_prQuery = strtoupper($_prQuery);
$sb->append("WHERE (UPPER(nome_usr) like '%{$_prQuery}%'");
$sb->append("OR UPPER(login_usr) like '%{$_prQuery}%')");
}
$sb->append("ORDER BY codigo_usr");
return $Sql->executaSQL($sb->toString());
}
示例2: listar
public function listar($_prQuery = '', $_prStart = 0, $_prLimit = 0)
{
$sb = new StringBuilder();
$Sql = new Sql();
$Sql->limit($_prStart, $_prLimit);
$sb->append("SELECT *,");
$sb->append("codigo_com as codigo,");
$sb->append("titulo_com as descricao");
$sb->append("FROM " . T_COM);
if (trim($_prQuery) != '') {
$_prQuery = strtoupper($_prQuery);
$sb->append("WHERE (UPPER(titulo_com) like '%{$_prQuery}%'");
$sb->append("OR UPPER(comunicado_com) like '%{$_prQuery}%')");
}
$sb->append("ORDER BY codigo_com");
return $Sql->executaSQL($sb->toString());
}
示例3: listar
public function listar($_prQuery = '', $_prStart = 0, $_prLimit = 0)
{
$sb = new StringBuilder();
$Sql = new Sql();
$Sql->limit($_prStart, $_prLimit);
$sb->append("SELECT *,");
$sb->append("codigo_emp as codigo,");
$sb->append("nome_emp as descricao");
$sb->append("FROM " . T_EMP);
$sb->append("LEFT JOIN");
$sb->append(T_DEP);
$sb->append("ON codigo_dpt = departamento_emp");
if (trim($_prQuery) != '') {
$_prQuery = strtoupper($_prQuery);
$sb->append("WHERE (UPPER(nome_emp) like '%{$_prQuery}%'");
$sb->append("OR UPPER(nome_dpt) like '%{$_prQuery}%')");
}
$sb->append("ORDER BY codigo_emp");
return $Sql->executaSQL($sb->toString());
}