application/models/Fluidtype_model.php
/**
     * Creates or modifies a fluid type object.
     */
Creates or modifies a fluid type object.
Creates or modifies a fluid type object .
public function store($post) {        
        $now = date('Y-m-d h:i:s');
        $fluidtype = ($post['fluidtype_id']==0 ? R::dispense('fluidtype') : R::load('fluidtype', $post['fluidtype_id']));
        $fluidtype->fluid_type = $post['fluid_type'];
        if($post['fluidtype_id']==0) {
            $fluidtype->created = $now;
            $fluidtype->created_by = $_SESSION['user_id'];
        } else {
            $fluidtype->modified = $now;
            $fluidtype->modified_by = $_SESSION['user_id'];
        }
        R::store($fluidtype);
    }
public function store ( $ post ) { $ now = date ( 'Y-m-d h:i:s' ) ; $ fluidtype = ( $ post [ 'fluidtype_id' ] == 0 ? R :: dispense ( 'fluidtype' ) : R :: load ( 'fluidtype' , $ post [ 'fluidtype_id' ] ) ) ; $ fluidtype -> fluid_type = $ post [ 'fluid_type' ] ; if ( $ post [ 'fluidtype_id' ] == 0 ) { $ fluidtype -> created = $ now ; $ fluidtype -> created_by = $ _SESSION [ 'user_id' ] ; } else { $ fluidtype -> modified = $ now ; $ fluidtype -> modified_by = $ _SESSION [ 'user_id' ] ; } R :: store ( $ fluidtype ) ; }
Creates or modifies a fluid type object.
Creates or modifies a fluid type object .