Welcome Guest, Not a member yet? Register   Sign In
How do I make a database row be a global?
#8

(06-26-2017, 10:28 AM)Kaosweaver Wrote:
PHP Code:
<?php
class MY_Admin extends CI_Controller {

public 
$me;

public function 
__construct()
 
   {
 
           parent::__construct();
 
           $this ->load->database();  
            $this
->me "testing 123";

 
   }



Then in your controller:

PHP Code:
public function somefunc() {

 
  echo $this->me;


I did that but I still get the same error.

Undefined property: Admin::$me

I would like a database row to be accessible from all controllers.
Reply


Messages In This Thread
RE: How do I make a database row be a global? - by desbest - 06-27-2017, 02:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB