CodeIgniter Forums
Can't show data table 'entries' of tutorial - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Can't show data table 'entries' of tutorial (/thread-23243.html)



Can't show data table 'entries' of tutorial - El Forum - 10-04-2009

[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.


Can't show data table 'entries' of tutorial - El Forum - 10-07-2009

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


Can't show data table 'entries' of tutorial - El Forum - 10-07-2009

[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/screencasts/codeigniter-from-scratch-day-1/#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.


Can't show data table 'entries' of tutorial - El Forum - 10-16-2009

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


Can't show data table 'entries' of tutorial - El Forum - 10-17-2009

[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;



Can't show data table 'entries' of tutorial - El Forum - 10-18-2009

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


Can't show data table 'entries' of tutorial - El Forum - 10-19-2009

[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.


Can't show data table 'entries' of tutorial - El Forum - 10-21-2009

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


Can't show data table 'entries' of tutorial - El Forum - 10-21-2009

[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. :-)