Welcome Guest, Not a member yet? Register   Sign In
Models causing blank pages
#3

[eluser]phused[/eluser]
Thanks for the information, it was helpful. I have updated my code and also edited my PHP configuration although I seem to be getting another error which I'm sure isn't!

My code is looking like this now:

Code:
<?php

class Tickets_model extends Model {

    function Tickets_model()
    {
        // Call the Model constructor
        parent::Model();
    }


    function display_open_tickets()
    {

        // Connect to database
        $this->load->database();
        
        $query = $this->db->query('SELECT id, title, priority FROM tickets');
        
        foreach ($query->result_array() as $row)
        {
            echo $row['id'];
            echo $row['title'];
            echo $row['priority'];
        }
                
    }
}

?>

This is the error I'm getting now:

Quote:Parse error: syntax error, unexpected '{' in /var/www/html/CodeIgniter/system/application/models/tickets_model.php on line 3

What am I doing wrong, any ideas?

Thanks in advance Smile


Messages In This Thread
Models causing blank pages - by El Forum - 09-12-2008, 07:29 PM
Models causing blank pages - by El Forum - 09-12-2008, 10:23 PM
Models causing blank pages - by El Forum - 09-13-2008, 06:03 AM
Models causing blank pages - by El Forum - 09-13-2008, 06:47 AM
Models causing blank pages - by El Forum - 09-13-2008, 07:23 AM
Models causing blank pages - by El Forum - 09-13-2008, 07:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB