Created
August 12, 2015 10:34
-
-
Save tranquangchau/6ab8c47a11aab8a41ebc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->config->item('base_url'); | |
http://www.codeigniter.com/user_guide/general/ancillary_classes.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cách viết hay ho
http://chris-schmitz.com/cleaning-up-your-codeigniter-controllers/
return $this->db
->where('id', $product_id)
->update('products', $attributes);
public function update($product_id, $input)
{
$attributes = array(
'name' => $input['name'],
'price' => $input['price'],
'short_description' => $input['short_description'],
'long_description' => $input['long_description']
);