Skip to content

Instantly share code, notes, and snippets.

@jlebrech
Created January 31, 2011 11:19
Show Gist options
  • Save jlebrech/803918 to your computer and use it in GitHub Desktop.
Save jlebrech/803918 to your computer and use it in GitHub Desktop.
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class page extends CI_Model {
var $code = "";
var $permalink = "";
function __construct()
{
parent::__construct();
}
function get_page($permalink)
{
return $this->db->get_where('pages',array('permalink'=>$permalink));
}
}
?>
@jlebrech
Copy link
Author

What am i doing wrong?

Fatal error: Call to a member function get_where() on a non-object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment