Return to Snippet

Revision: 23438
at February 8, 2010 00:06 by mattstopa


Initial Code
<?php
class Helloworld_model extends Model {

    function Helloworld_model()
    {
        // Call the Model constructor
        parent::Model();
    }
    
    function getData()
		{
			//Query the data table for every record and row
			$query = $this->db->get('data');
			
			if ($query->num_rows() > 0)
			{
				//show_error('Database is empty!');
			}else{
				return $query->result();
			}
		}

}
?>

Initial URL


Initial Description


Initial Title
Basic Code Igniter Model

Initial Tags


Initial Language
PHP