Welcome Guest, Not a member yet? Register   Sign In
Data from database not showing up
#1

[eluser]GamingFusion[/eluser]
I am trying to get data to display from a database onto an page for my removeShow page but it wont.

After digging a bit i found that what ever code is below my getShows()function does not want to display. Whats wrong with it.

Heres the model function getShows()
Code:
//getShows Function
function getShows()
{
    //Get Shows Data
    $this->db->get('shows');    
}

and heres my view page

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
&lt;title&gt;&lt;?=$title?&gt;&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
<h1>&lt;?=$heading?&gt;</h1>
&lt;?=$subheading?&gt;

&lt;?php foreach($query->result() as $row): ?&gt;

<h2><b>&lt;?=$row->title?&gt;</b></h2>
<small>Directed by: &lt;?=$row->director?&gt;</small>
<hr />
<h3><b>Show Times</b></h3>
<p>&lt;?=$this->typography->nl2br_except_pre($row->showtimes)?&gt;</p>
<h3><b>Cast</b></h3>
<p>&lt;?=$this->typography->nl2br_except_pre($row->cast)?&gt;</p>
        
&lt;?php endforeach; ?&gt;
&lt;/body&gt;
&lt;/html&gt;

and heres my controller

Code:
//removeShow Function
function removeShow()
{
    $data['title'] = 'Theater 311 | Remove a Show';
    $data['heading'] = 'Remove a Show';
    $data['subheading'] = 'Pick a Show to Remove';
    $data['query'] = $this->database->getShows();
    
    $this->load->view('removeShow', $data);
}


Messages In This Thread
Data from database not showing up - by El Forum - 10-23-2009, 08:55 PM
Data from database not showing up - by El Forum - 10-23-2009, 10:30 PM
Data from database not showing up - by El Forum - 10-23-2009, 10:48 PM
Data from database not showing up - by El Forum - 10-24-2009, 09:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB