Created
July 22, 2013 05:34
-
-
Save WenLiangTseng/6051493 to your computer and use it in GitHub Desktop.
CodeIgniter 使用日期判斷的 MySQL 語法
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// if you still want to use AR, | |
// you could pass a FALSE as third parameter of | |
// $this->db->where | |
// to avoid automatic escaping by CI: | |
$this->db->select('id,name') | |
->where('dr','1') | |
->where('end >=', 'CURDATE()', FALSE); | |
$query = $this->db->get('store'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment