<?php
class Barang extends Database
{
   protected $mSqlFile;
   
	function __construct($connectionNumber=0)
   {
      $this->mSqlFile = 'module/'.Dispatcher::Instance()->mModule.'/business/PopupBarang.sql.php';
		parent::__construct($connectionNumber);	
                #$this->setDebugOn();
	}
   
   function GetDataBarangCount($kodeBarang, $namaBarang)
   {
     $result = $this->Open($this->mSqlQueries['get_data_barang_count'],array('%'.$kodeBarang.'%', '%'.$namaBarang.'%' ));
     return $result[0]['total'];
   }
   
   function GetCount(){
      $result = $this->Open($this->mSqlQueries['get_count'],array());
      return $result[0]['total'];
   }
   
   function GetDataBarang($kodeBarang, $namaBarang, $start ,$limit)
   {	
      $result = $this->Open($this->mSqlQueries['get_data_barang'],array('%'.$kodeBarang.'%','%'.$namaBarang.'%', $start,$limit));		
      return $result;
   }
}
?>
