Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Tags
- 톰캣
- DB
- JSON
- 정규식
- NetBeans
- javascript
- 리눅스
- laravel
- Linux
- error
- jquery
- Spring
- input
- 안드로이드
- properties
- Android
- html
- File
- 이클립스
- ajax
- junit
- 와일드카드
- MySQL
- java
- SeLinux
- CentOS
- tomcat
- curl
- larravel
- php
Archives
- Today
- Total
합쭈기 programming
[Laravel] and 절에 or 넣을때 본문
where('code','=','p_')->orWhere('sub_code','=','e_')를 하면
and code = 'p_' or sub_code = 'e_'
이런식에 쿼리문이 되고
where(function($query){
$query->where('code', '=', 'p_')
->orWhere('sub_code', '=', 'e_');
});
이렇게 하면
and (code = 'p_' or sub_code = 'e_')
이런 쿼리문이 된다.
'Dev story' 카테고리의 다른 글
[Laravel] file_put_contents(/home/intra/bootstrap/cache/services.json): failed to open stream: Permission denied (0) | 2016.01.13 |
---|---|
[Laravel] phpunit 사용하기 (0) | 2016.01.13 |
[Laravel] blade template (0) | 2015.11.25 |
[Laravel] Connection could not be established with host (0) | 2015.11.23 |
[Laravel] HTTP 301 (0) | 2015.11.06 |