/**
  * delete
  * Fungsi untuk menghapus record
  * @return string SQL Query
  **/
 public function delete()
 {
     $table = static::$table;
     if ($table != '') {
         if (self::$_id != '' || is_array(self::$_id) && count(self::$_id) > 0) {
             //echo $table;
             $ret = self::$db->{$table}->delete(self::$_id);
             self::$_data = array();
         } else {
             $ret = FALSE;
         }
     }
     return $ret;
 }
Example #2
0
 public static function setData($data)
 {
     self::$_data = $data;
 }