Welcome Guest, Not a member yet? Register   Sign In
How to remove the first word From Mysql Table?
#11

(05-08-2021, 10:26 AM)litecoin90 Wrote:
(05-08-2021, 09:29 AM)nfaiz Wrote: Like this SQL?

Code:
UPDATE items SET
Coupon_codes = SUBSTRING(Coupon_codes, LOCATE(' ', Coupon_codes)+1)
--WHERE id = :id:

Yes . But How Can i do This in codeigniter?


Here is My code 


Code:
public function updateItemcoupon($data, $id)
    {
        $this->db->where('Items', $id);
        $this->db->update('Coupon_codes', $data);
        return TRUE;
    }


What should i add ??

https://www.codeigniter.com/user_guide/d...ating-data

$builder->set()
set the third parameter to false?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB