[eluser]Unknown[/eluser]
Hi,
I use Codeigniter together with EasyPHP (both the newest). Creating pages was working well but when I started to use database I got a serious problem: When i open the page in my web browser the page loads something but does nothing. No error caption or text, just still loading. Some hints?
Here is the code
autoload.php:
Code:
$autoload['libraries'] = array('database', 'session', 'validation');
database.php:
Code:
$active_group = "default";
$active_record = TRUE;
$db['default']['hostname'] = "localhost";
$db['default']['username'] = "root";
$db['default']['password'] = "";
$db['default']['database'] = "school";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
welcome.php:
Code:
$this->db->select('name, lastname');
$this->db->from('student');
$this->db->where('username', 'myuser');
$query = $this->db->get();
if ($query->num_rows() > 0)
{
$row = $query->row();
echo $row->name;
echo $row->lastname;
}
Thanks, Lukas