I am trying to query some table on a component. But, this error keeps on
showing up.

*Fatal error*: Call to undefined method PostsController::query() in *
/site/www/app/controllers/components/web_logs.php* on line *21*

My code:

*my controller (note: i already declared "WebLogs" on var $components =
array('WebLogs');*

> *$this->WebLogs->ActivityLog('[EMAIL PROTECTED]'); // get from session*
>

*my component*

> *class WebLogsComponent extends Object {
>
>     var $controller = true;
>
>     function initialize(&$controller) { // used initialize, instead of
> startup?
>         $this->controller =& $controller;
>     }
>
>     function ActivityLog($username) {
>         $this->controller->query("select * from table where username =
> '$username'"); // check mysql.log if it is being executed
>         ......
>         return true;
>     }
> }*
>

Please help!

-- 
Louie Miranda ([EMAIL PROTECTED])
http://www.axishift.com

Security Is A Series Of Well-Defined Steps
chmod -R 0 / ; and smile :)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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