Created
June 20, 2012 16:41
-
-
Save ptasker/2960851 to your computer and use it in GitHub Desktop.
Codeigniter - Model get by FBID and Date
This file contains 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 | |
public function get_by_fbid( $fbid ) { | |
$where = "fbid = {$fbid} AND DATE_FORMAT(date_modified, \"%Y-%m-%d\") = CURDATE()"; | |
$this->db->select( 'id' ) | |
->from( 'entries' ) | |
->where( $where ); | |
$query = $this->db->get(); | |
return $query->result(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment