PHP CodeIgniter Tutorial 2 – Models / Database

Php

Video is ready, Click Here to View ×


Please Rate, Comment and Subscribe.

38 thoughts on “PHP CodeIgniter Tutorial 2 – Models / Database

  1. i got an error
    Message: Call to undefined method Products_model::getData()

    Filename: C:xampphtdocsproject_folderapplicationcontrollersProducts.php

    Line Number: 6

    here is my controller code
    class Products extends CI_Controller{
    public function index(){
    $this->load->model('Products_model');
    $data['records'] = $this->Products_model->getData();

    $this->load->view('pages/menus', $data);
    }
    please help.. thanks in advance

  2. sir! am getting the following fatal error please give me a solution

    Fatal error: Uncaught Error: Call to undefined method Mongo_db::_show_error() in C:xampphtdocsarcaneapplicationlibrariesmongo_db.php:11 Stack trace: #0 C:xampphtdocsarcanesystemcoreLoader.php(1099): Mongo_db->__construct() #1 C:xampphtdocsarcanesystemcoreLoader.php(975): CI_Loader->_ci_init_class('mongo_db', '', NULL, NULL) #2 C:xampphtdocsarcanesystemcoreLoader.php(216): CI_Loader->_ci_load_class('Mongo_db', NULL, NULL) #3 C:xampphtdocsarcaneapplicationcontrollerstemplateshome.php(12): CI_Loader->library('mongo_db') #4 C:xampphtdocsarcanesystemcoreCodeIgniter.php(308): Home->__construct() #5 C:xampphtdocsarcaneindex.php(201): require_once('C:\xampp\htdocs…') #6 {main} thrown in C:xampphtdocsarcaneapplicationlibrariesmongo_db.php on line 11

  3. I think that I have the same error :
    Warning:
    include(C:xampphtdocsCcastilloapplicationviewserrorshtmlerror_php.php):
    failed to open stream: No such file or directory in C:xampphtdocsCcastillosystemcoreExceptions.php on line 269

    Warning: include(): Failed opening
    'C:xampphtdocsCcastilloapplicationviewserrorshtmlerror_php.php'
    for inclusion (include_path='C:xamppphpPEAR') in C:xampphtdocsCcastillosystemcoreExceptions.php on line 269

    Warning:
    include(C:xampphtdocsCcastilloapplicationviewserrorshtmlerror_php.php):
    failed to open stream: No such file or directory in C:xampphtdocsCcastillosystemcoreExceptions.php on line 269

    Warning: include(): Failed opening
    'C:xampphtdocsCcastilloapplicationviewserrorshtmlerror_php.php'
    for inclusion (include_path='C:xamppphpPEAR') in C:xampphtdocsCcastillosystemcoreExceptions.php on line 269

    May you help me plz!!! :S

  4. thanks for the tutor

    but im facing trouble like this :
    An uncaught Exception was encounteredType: ParseError
    Message: syntax error, unexpected 'class' (T_CLASS)Filename: /opt/lampp/htdocs/dashboard/test/application/models/HomeModel.php
    Line Number: 3Backtrace:
    File: /opt/lampp/htdocs/dashboard/test/application/controllers/HomeController.php
    Line: 5
    Function: model
    File: /opt/lampp/htdocs/dashboard/test/index.php
    Line: 315
    Function: require_once

    i use codeigniter 3.x
    and atom as my editor

    My mistake, im using space at here <? php ?>

    The tutorial running well now

    thks ya

  5. please help me i have error : Warning: include(C:xampphtdocsOOP_TUTORIALCODEIGNITERapplicationviews/errorshtmlerror_php.php): failed to open stream: No such file or directory in C:xampphtdocsOOP_TUTORIALCODEIGNITERsystemcoreExceptions.php on line 269

Leave a Reply

Your email address will not be published. Required fields are marked *