Welcome Guest, Not a member yet? Register   Sign In
Tutorial for CI
#1

[eluser]Unknown[/eluser]
Hi,

I'm new to CI.
I've tried to follow this tutorial :
http://www.developertutorials.com/tutori...page4.html

My config is ok, my DB is ok I got values in it.
The page appears but without data and when I look in the Source Code from the page, variable are not interpreted.
And naturally PHP is enabled Tongue

Do you know why ?

blueice
#2

[eluser]xwero[/eluser]
Instead of
Code:
$this->load->database();
    $this->load->model('jobs_model');
You can write
Code:
$this->load->model('jobs_model','',TRUE);

Code:
function get_jobs() {
    $query = $this->db->get('jobs');
    foreach ($query->result_array() as $row)
    {
      $result[] = $row;
    }
    return $result;
  }
The foreach loop isn't needed because the result_array method is the output they desire.

But apart from that i don't see anything that is wrong. Enable logging and check if there are errors.
#3

[eluser]Unknown[/eluser]
I've found the problem.
Confusednake:
I didn't remember that I reinitialized my php.ini and short_tag was Off

Thank you




Theme © iAndrew 2016 - Forum software by © MyBB