• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Message: Undefined property: options_controller::$db =error

#1
[eluser]bill19[/eluser]
Hi everyone,

I have the following code:

Code:
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class op_controller extends CI_Controller {

public function index()
{
  
          

                
                if ($this->db->table_exists('zp'))
{
                    echo "zp exists";
}

I am getting : A PHP Error was encountered

Severity: Notice

Message: Undefined property: op_controller::$db

followed by:

Quote:Fatal error: Call to a member function table_exists() on a non-object in C:\wamp\www\options1101\application\controllers\op_controller.php

At present the table does not exist. Any ideas?

KC


Messages In This Thread
Message: Undefined property: options_controller::$db =error - by El Forum - 11-05-2011, 07:25 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.