Wednesday, 21 August 2013

Database_Exception [ 1146 ]: Table 'kohana.userdetailses' doesn't exist

Database_Exception [ 1146 ]: Table 'kohana.userdetailses' doesn't exist

This is my Controller
userdetails.php
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Userdetails extends Controller {
public function action_index() {
$view = new View('userdetails/index');
$this->response->body($view);
}
public function action_add() {
$userdetails = new Model_Userdetails();
$view = new View('userdetails/adddetails');
$view->set("userdetails", $userdetails);
$this->response->body($view);
}
model is
userdetails.php
<?php defined('SYSPATH') or die('No direct script access.');
class Model_Userdetails extends ORM {
}
userinfo.sql
CREATE TABLE `kohana`.`userinfo` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`first_name` varchar(100) DEFAULT NULL,
`last_name` varchar(100) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`description` text,
PRIMARY KEY (`id`)
);
I am newly learning php and kohana.I am using kohana 3.2 version.I am
following this tutorial to create,edit,update and delete data in
database.I tried with above code,i am getting this error
"Database_Exception [ 1146 ]: Table 'kohana.userdetailses' doesn't exist [
SHOW FULL COLUMNS FROM `userdetailses` ]"
need some help to solve this.

No comments:

Post a Comment