anjhar

forum_model

Nov 24th, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. <?php
  2. class Forum_model extends CI_Model {
  3.  
  4. private $db_forum = null;
  5. //var $db_forum;
  6. /**
  7. * Construct
  8. *
  9. * @return void
  10. */
  11. function __construct() {
  12. parent::__construct();
  13. $this->db_forum = $this->load->database('forum',TRUE);
  14. }
  15.  
  16. function test()
  17. {
  18. $query = "SELECT COUNT(cid_jenis_kelamin) FROM pegawai WHERE cid_jenis_kelamin='l'; ";
  19. $result = $this->db_forum->query($query);
  20. return $result->result();
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment