Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB