Welcome Guest, Not a member yet? Register   Sign In
Hi, I need some help with this.
#31

[eluser]luchezze[/eluser]
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

$autoload['libraries'] = array();

$autoload['helper'] = array();

$autoload['plugin'] = array();

$autoload['config'] = array();

$autoload['language'] = array();

$autoload['core'] = array('database');

?>
#32

[eluser]luchezze[/eluser]
PROBLEM SOLVED! aircraf u got 2 set this in your autoload.php file:
$autoload['libraries'] = array('database'); and remove $autoload['core'] = array('database');. The video tutorial is to old for the codeigniter version! Good LUCK!
#33

[eluser]aircraft[/eluser]
Thanks alot, thanks everyone who tried to help me out.
#34

[eluser]jinit13[/eluser]
Sorry for uppin this topic, but i have the same problem and followed each solution and I can't get it running.

Blog Controller
Code:
<?php

class Blog extends Controller{

     function __construct () {
        parent::Controller();
        //Scaffolding entries.
        //$this->load->scaffolding('entries');
    }

    function index(){
        //blog/index
        $data['title']='CI Fancy Weblog!';

        $data['query']=$this->db->get('entries');

        //Load the view.
        $this->load->view("blogindex_view", $data);
    }
}
?>

blogindex_view
Code:
<html>
    <head>
        <title><?=$title?></title>
    </head>
    <body>

<?php foreach($query->results() as $row):?>

<h3>&lt;?=$row->title?&gt;</h3>
<p>&lt;?=$row->body?&gt;</p>

<hr>

&lt;?php endforeach; ?&gt;

    &lt;/body&gt;
&lt;/html&gt;

And I set $autoload['libraries'] as the following.
Code:
$autoload['libraries'] = array('database');

Using Apache/MySQL

Err Msg:
Quote:Fatal error: Call to undefined method CI_DB_mysql_result::results() in C:\wamp\www\cier\CodeIgniter\system\libraries\Loader.php(706) : eval()'d code on line 7
#35

[eluser]jinit13[/eluser]
Ouch sorry mis-spelled method results() instead of result(). Works fine now.
#36

[eluser]ywftdg[/eluser]
Thanks for posting the fix on this, I was doing the video tutorial today and spent forever trying to debug why this was having issues. Maybe someone can slap a quick edit in the video, or on that page a note for future viewers? Either way, great work on this framework, just getting started, I quickly left Cakephp (to try CI) due to the difficult learning curve and really, really bad documentation for a basic/self-taught php coder like myself.
#37

[eluser]ConnorD[/eluser]
Hello, this is my first post here and my first day using the codeigniter FW. I was having the same problems with the data access, and thank you everybody for helping me to fix it, so that my initial experience with this FW is a good one. I have to say, after using prado, cakePHP, and a few other frameworks, nothing compares to CI!
#38

[eluser]felixk[/eluser]
Hello!
I'm having the same problem, and I've tried all different solutions and tips that you earlier have posted. Nothing works.
I'm getting this error-message: Call to a member function get() on a non-object in...

I've followed the video tutorial and read threw my code many times, but without any result.

I have also changed to this code:
Code:
$autoload['libraries'] = array('database');
In the autoload.php

Please help me!




Theme © iAndrew 2016 - Forum software by © MyBB