<?php
/**
 * Copy Right IJH.CC
 * Each engineer has a duty to keep the code elegant
 * $Id$
 */

if(!defined('__CORE_DIR')){
    exit("Access Denied");
}

class Mdl_Xiche_Order_product extends Mdl_Table
{   
  
    protected $_table = 'xiche_order_product';
    protected $_pk = 'id';
    protected $_cols = 'id,order_id,product_id,product_name,product_price,product_number,dateline';


    
    public function create($data)
    {
 

    	if(!$o = $this->insert($data, true)){
    		return false;
    	}

        return $o;
    }
    
    
    
     public function insert($data)
    {

        $data['dateline'] = $data['dateline'] ? $data['dateline'] :  __CFG::TIME;
        if($uid = $this->db->insert($this->_table, $data, true)){
            //$this->db->Execute("INSERT INTO ".$this->table('member_fields')."(uid) VALUES('$uid')");
            return $uid;
        }
        
    }
    
}