Advertisement
taktikhek

Untitled

Sep 11th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. class Dashboard_model extends CI_Model {
  3. function __construct() {
  4. parent::__construct();
  5. }
  6.  
  7. function group_transaksi(){
  8. $this->db->from('transaksi')
  9. ->select("concat(year(tanggal),'-',month(tanggal)) yt,status,count(id_transaksi) n")
  10. ->where('status','Selsai')
  11. ->or_where('status','Di Batalkan')
  12. ->group_by('yt,status');
  13. // ->order_by('tgl','asc');
  14. $table=$this->db->get();
  15. return $table->result_array();
  16. }
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement