i am beginner to cake php. my table name is tbl_admin

i created one model with file name tbl_admin.php.

Model code:
class Eego_tbl_admin extends AppModel
{
var $name = 'tbl_admin';


function finduser()
{
//$ff=$this->query("select count(*) from tbl_admin where
admin_username='admin'");

return $ff;
}


}

controller file name is user_controller.php

controller code

class UserController extends AppController {



function login()
{
echo $gg=$this->tbl_admin->finduser();
}

}

my view page is login.php. it is in user folder.
when i login page it showing the following error.

Notice (8): Undefined property: UserController::$tbl_admin
[APP\controllers\user_controller.php, line 8]

Fatal error: Call to a member function finduser() on a non-object in
C:\wamp\www\app_cake\app\controllers\user_controller.php on line 8


what wrong in my code

-- 
View this message in context: 
http://old.nabble.com/pls-help-me-in-cake-php-model-method-tp27849150p27849150.html
Sent from the CakePHP mailing list archive at Nabble.com.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to