Symfony3 查询搜索功能DQL语句like查询
//前台页面代码
<form method="GET" action="{{ path('staff_index') }}" name="searchterm">
<label>
<input name="searchterm" type="text" value="" placeholder="输入名称" >
</label>
<input type="submit" value="查询">
</form>
/**
* Lists all customer entities.
*
* @Route("/", name="staff_index")
* @Method("GET")
* @Template()
*/
public function indexAction(Request $request)
{
$em = $this->getDoctrine()->getManager();//实体管理
$searchterm = $request->get('searchterm');//页面参数获取
$page = $request->query->getInt('page',1);
$query = $em->getRepository('XinXiBundle:Customer')//实体查询
->createQueryBuilder('u');
if (!null == $searchterm){//如果参数不为空就执行like查询
$query->where(
$query->expr()->like('u.name', ':user')
)
->setParameter('user','%'.$searchterm.'%')
->getQuery()
->getResult();
}else{
$query->orderBy('u.id','desc') //否则查询所有列表
->getQuery();
} $pagination = $this->get('knp_paginator') //分页功能
->paginate($query,
$page,5);
return [
'pagination' => $pagination,
];
}
多个条件查询时使用 andWhere 如下:
$em = $this->getDoctrine()->getManager();
$searchterm = $request->get('searchterm');
$page = $request->query->getInt('page',1);
$query = $em->getRepository('XinXiBundle:Customer')
->createQueryBuilder('u'); if (!null == $searchterm){
$query
->andWhere($query->expr()->like('u.name', ':user'))
->andWhere('u.status = :status')
->setParameter('status',true)
->setParameter('user','%'.$searchterm.'%')
->getQuery()
->getResult(); }else{
$query->orderBy('u.id','desc')
->where('u.status = :status')
->setParameter('status',true)
->getQuery();
}
实体关联查询
$em = $this->getDoctrine()->getManager();
$searchterm = $request->get('searchterm');
$page = $request->query->getInt('page', 1);
$query = $em->getRepository('XinXiBundle:Finance')
->createQueryBuilder('f');
if (!null == $searchterm) {
$query
->join('f.customer' , 'customer') //关联实体属性 现在别名为customer
->andWhere($query->expr()->like('customer.name', ':name'))//此时再使用customer.属性值进行like查询
->andWhere('f.status = :status')
->setParameter('status', true)
->setParameter('name', '%' . $searchterm . '%')
->orderBy('f.id', 'desc')
->getQuery()
->getResult();
微信公众号:
aaarticlea/jpeg;base64,/9j/4AAQSkZJRgABAQAA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DNf1TZzmv5WhwelKeBjH50AJ61/VN1phHPev5XCeelACV/VOe9fysV/VOe9AH8rB60UHrRQAAZNf1Tg5oIJBGaQLg0AKSB1oByKaw5z7dK/lbPXpQB/VPX8q/XFf1T5r+VrGKAG4oIwa/qlOev6V/K2Rz0/KgD+qeiiigAooooAKKKKAE71/KxX9U/ev5WKAP6pzzQBiv5WKKAP6p8ewox7Cv5WKKAP6pySBnGa/lZIxg+9IDg0ZJNAH9U46UtIOlLQB/KvmlBJpKB1oAdjvmmng9a/qnxmv5WCc0AKOvWv6pFPP9acRkUYAFADSxB6V/K2QPWj1r+qbpQB/KwOT1p2O+aaDiv6p8YoA/lZ6V/VMBiv5WfWv6p6AEI46V/K12z61/VKRkYNAGKAP5WxyK/qjHTpS96/lY60ALgetf1SbsnGPxpxGRRtHpQB/K1tHX3ppGDX9U5Ar+VgnNAH9U9FfysUUAf1TMecYpQOOlfysA1/VOBigD+Vkdetf1SA896cRkUYAFACYz1pQMdq/lYPWigD+qiiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/9k=" alt="" />
Symfony3 查询搜索功能DQL语句like查询的更多相关文章
- Statement执行DQL语句(查询操作)
import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; import org.junit.T ...
- kettle两表内链接的查询结果与sql语句的查询结果不符合?
1.教师表输入 2.学生表 查 3.学生表中查出的教师id进行排序 5.教师表中查出的同样也对教师的id进行排序 6.进行左连接 总结: 进行连接的时候的关键是同样对教师的id进行先排序
- php 搜索(查询)功能
今天遇到一个问题:在做“搜索”功能时,输入查询条件后查询不了. 我做的是首页显示数据表package中的内容,但是有个条件,显示在首页的内容还必须是 :字段status=0,且printing=0的数 ...
- ThinkPHP之中getlist方法实现数据搜索功能
自己在ThinkPHP之中的model之中书写getlist方法,其实所谓的搜索功能无非就是数据库查询之中用到的like %string%,或者其他的 字段名=特定值,这些sql语句拼接在and语句 ...
- 使用Statement执行DML和DQL语句
import com.loaderman.util.JdbcUtil; import java.sql.Connection; import java.sql.DriverManager; impor ...
- MVC5搜索/查询 流程功能的实现
接着上次的篇幅,我们这篇手动来写一个查询的流程代码! 搜索/查询 流程功能的实现 那现在要做搜索(查询)功能我们第一步应该做什么呢!第一次是不是我们应该去Controller(控制器)里去搞一个搜索 ...
- 6.2笔记-DQL语句查询数据库
一.DQL语句 1.常量列 SELECT `StudentName` AS 姓名, `Address` AS 地址, '北京信息中心' AS 学校名称 FROM `student`; 2.常用函数 聚 ...
- Springboot+Vue实现仿百度搜索自动提示框匹配查询功能
案例功能效果图 前端初始页面 输入搜索信息页面 点击查询结果页面 环境介绍 前端:vue 后端:springboot jdk:1.8及以上 数据库:mysql 核心代码介绍 TypeCtrler .j ...
- Hibernate执行SQL语句实现查询修改功能!
今天玩Hibernate时突然就想写写SQL语句查询... DAO : //查询 public List<?> createSqlQueryList(final String queryS ...
随机推荐
- XP中如何配置和共享打印机
Win XP中如何配置和共享打印机 一.配置 打印机 在"控制面板"打开"打印机和传真",在左边的选项或单击右键选择" ...
- Django与SQL语言中——NULL与空字符串的区别
SQL有指定空值的独特方式,它把空值叫做NULL. Null在数据库中表示 不知道的数据,主要有3种意思: 1)知道数据存在,但不知道具体值. 2)不知道数据是否存在. 3)数据不存在. 在SQL中, ...
- c语言字符串赋值
char *p="asdf";能运行 定义一个字符指针,并用它指向常量字符串"asdf"的首地址 char *p;p="asdf"; 能运行 ...
- iOS开发之状态栏隐藏(问题篇)
一.基本应用 相信基本的隐藏办法网上很多,这里只简单说明一下 1⃣️改变全局状态栏 1.在项目的Info.plist文件里设置UIViewControllerBasedStatusBarAppeara ...
- Android下Sqlite的使用(9.7)
1 http://blog.csdn.net/liuhe688/article/details/6715983 2 http://www.eoeandroid.com/thread-170715-1- ...
- 查看/设置MySQL数据库的事务隔离级别
查看InnoDB存储引擎 系统级的隔离级别 和 会话级的隔离级别: mysql> select @@global.tx_isolation,@@tx_isolation; +---------- ...
- 挖一挖C#中那些我们不经常使用的东西之系列(4)——GetHashCode,ExpandoObject
一:GetHashCode 从MSDN上能够看到的解释是:用作特定类型的哈希函数,也就是说不论什么对象的实例都会有一个int32类型的HashCode.而且存放在FCL中的 HashCollectio ...
- 自定义Spring Shell
目录 概述 自定义内置命令 禁用内置命令 覆盖内置命令 自定义命令提示符 自定义命令行选项行为 自定义参数转换器 概述 官网:https://projects.spring.io/spring-she ...
- IIS 下 部署nodejs 使用反向代理
目标服务器:targetServer 配置反向代理的服务器:reveseProxServer iis应该是iis7及以上版本,才可以. 1.确定最终访问的网址:比如www.baidu.com .ww ...
- lua学习笔记(七)
错误处理 assert(exp) error("error message text") pcall安全调用 协同程序 lua没有真正的多线程,都是使用协同程序也实 ...