How to remove the first word From Mysql Table? |
-
nfaiz
Member
-
Posts: 59
Threads: 10
Joined: Apr 2015
Reputation:
3
(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?
|