Welcome Guest, Not a member yet? Register   Sign In
Can't show data table 'entries' of tutorial
#1

[eluser]mrfree[/eluser]
I use codeigniter latest release and xampp 1.7.2, and then I download 2 video tutorial on website and make my first lession but the data of table 'entries' is not show any thing until I repalce with echo command of PHP.

Other, in the file autoload.php I can't see the line $autoload['core']=array(), I only see the line $autoload['libraries'] = array(''); I wonder anything wrong when I use this line code $autoload['libraries'] = array('database');

I think, webmaster or mod should be put a download of the source code of video tutorials.

thank you for your help.
#2

[eluser]mrfree[/eluser]
Please help me. Thks
#3

[eluser]cahva[/eluser]
Remeber that those tutorial videos are oldish and theres been some changes in CI after that. In later CI theres no such thing as $autoload[‘core’] anymore. But as you noticed, use $autoload['libraries'] = array('database'); if you use database.

Theres more recent tutorials found on Nettuts+:
http://net.tutsplus.com/videos/screencas...#more-5812

If you want help with the current code you have, paste it here so we can see what you have done. When you say "is not show any thing until I repalce with echo command of PHP", it really doesnt tell us much about your problem.
#4

[eluser]mrfree[/eluser]
Thank you for your help,Chava. I will pass my code in here as soon as.
#5

[eluser]mrfree[/eluser]
This is my code with blog.php

Code:
<?php  
class Blog extends Controller
  {
      function Blog()
      {
          
          parent::Controller();        
         //         $this->load->scaffolding('entries');
        // $this->load->helper('url');
         //$this->load->helper('form');
        
       }  
      function index()
      {
          $data['title']  ="My blog title";
          $data['heading']="My blog heading";
          $data['query']=$this->db->get('entries');
          $this->load->view('blog_view',$data);
         // echo 'Hello';
      }
  }
?>

and below is blog_view.php
Code:
<html>
<head>
<title><?=$title?></title>
</head>
<body>
  <h1>&lt;?=$heading?&gt;</h1>
  &lt;?php  foreach($query->result() as $row): ?&gt;
    <h3>&lt;?=$row->title?&gt;</h3>
    <p>&lt;?=$row->body?&gt;</p>
    <hr>
  &lt;?php endforeach;?&gt;
&lt;/body&gt;
&lt;/html&gt;
#6

[eluser]mrfree[/eluser]
Please, someone help me with my first code of codeigniter.
#7

[eluser]imn.codeartist[/eluser]
your controller and view are seems ok too me. If you only add model on it then it will be complete.
#8

[eluser]mrfree[/eluser]
In the video tutorial make blog I don't see any guide write model.
#9

[eluser]imn.codeartist[/eluser]
[quote author="mrfree" date="1256207502"]In the video tutorial make blog I don't see any guide write model.[/quote]
well go through the CI documentation I am sure you will find one. :-)




Theme © iAndrew 2016 - Forum software by © MyBB