Wrox Home  

Topic: Open Source

Professional CodeIgniter (0470282452) cover image

Professional CodeIgniter

Thomas Myer
ISBN: 978-0-470-28245-8
336 pages
July 2008
This title is out-of-print and not currently available for purchase from this site.

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
60 Error in Code
First code fragment:
$this->session->set_userdata('user_email'], $row->email);

should be:
$this->session->set_userdata('user_email', $row->email);
67 Error in Book Code
$Q = $this->db->getwhere(products,$options,1);

should be:
$Q = $this->db->getwhere('products',$options,1);

This code is correct in the downloaded version.
4 87 Error in Code
$home['mainf'] = $this->MProducts->getMainFeature();
$skip = $home['mainf']['id'];
$home['sidef'] = $this->MProducts->getRandomProducts(3,$skip);
$data['main'] = $this->load->view('home',$home,true);

should be:

$data['mainf'] = $this->MProducts->getMainFeature();
$skip = $data['mainf']['id'];
$data['sidef'] = $this->MProducts->getRandomProducts(3,$skip);
$data['main'] = 'home';
102 Error in Code
the search() function contains this group of code:

if ($this->input->post('term')){
$search['results'] = $this->MProducts->search($this->input->post

The use of $search['results'] is incorrect, as it should be $data['results'] instead, like this:

if ($this->input->post('term')){
$data['results'] = $this->MProducts->search($this->input->post('term');

The code is correct in the downloadable zip archive.
110 Error in Code
In function updateCart:

$prevname = $cart[$productid][?price?];

should be

$prevprice = $cart[$productid][?price?]
111 Error in Code
In the following code:

function cart($productid){
if ($productid > 0){
$fullproduct = $this->MProducts->getProduct($productid);
redirect(‘welcome/product/’.$productid, ‘refresh’);
$data[‘title’] = “Claudia’s Kids | Shopping Cart”;
if (count($_SESSION[‘cart’]) == true){
$data[‘main’] = ‘’;
$nav[‘navlist’] = $this->MCats->getCategoriesNav();

$nav[‘navlist’] = $this->MCats->getCategoriesNav();

Should be

$data[‘navlist’] = $this->MCats->getCategoriesNav();
Printer-Ready Version   Share This
With you wherever you go: pdf + ePub + kindle -- DRM-free