Welcome Guest, Not a member yet? Register   Sign In
Adding text to record field
#1

Hi!

I need to add text to record (NOT OVERWRITE). This is my code, but it's overwriting to field 8, and I don't know why.

CONTROLLER:
PHP Code:
    public function ServiceDecline$id "" ) {

        
$id = array( 'id' => $id );

        
$UserID $this->ion_auth->user()->row();

        
$DeclineList $this->AdminServices_model->DeclineList();
        
$DeclineList array_push$DeclineList $UserID->id );

        
$AddDeclined = array( 'odrzucili' => $DeclineList );

        
$this->AdminServices_model->DeclineService$id$AddDeclined );
        
    } 

MODELs:
PHP Code:
    public function DeclineList(  ) {
        
$query $this->db->get'services' );

        return 
$query->result();
    } 
PHP Code:
    public function DeclineService$id$AddDeclined ) {
        if ( 
$this->db->update'services'$AddDeclined$id ) ) {
            
$this->session->set_flashdata('msg''Success!');
            
redirect'service/zgloszenia' );
        }

    } 
Reply


Messages In This Thread
Adding text to record field - by vertisan - 08-02-2015, 06:47 AM
RE: Adding text to record field - by msteudel - 08-03-2015, 10:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB