Hey Dhileepen,

In cake the model uses the bydefault table as per its name. As like you are
using post model so it will take the table as posts.
For using another table you have to specify in that model like,

var $useTable = 'tablemame';

Then it will uses the table other than model name.

For more info please read this,

http://book.cakephp.org/view/436/useTable

also if you are getting the error like the 1st post

Notice (8): Undefined index:  username [APP\controllers\posts_controller.php,
line 60]

you can resolve this error by print_r(arrayname);

so you can check the array / array variables that you are using is correct
or not.


On Mon, Jul 20, 2009 at 10:37 AM, Dhileepen Chakravarthy <
[email protected]> wrote:

> Thanks for your reply Thiago.
>
> But my problem was not solved.
>
> My login page in this directory,
>
> http://localhost/cake/posts/
>
> named index.ctp
>
> if i replace use your function then i got a following error.
>
> Query: SELECT `Post`.`id`, `Post`.`username` FROM `posts` AS `Post`   WHERE
> `username` = 's' AND `password` = 's'    LIMIT 1
>
> My table name is Users but it refer Post . Post is my controller name.
>
> Please clear my doubt. I dont know which place i did a mistake. how do i
> refer my table named users
>
> Regards,
> Dhileep
>
>
>
>
>
> >
>


-- 
Thanks & Regards,
Vijayk.
Co-founder (www.weboniselab.com)

"You Bring the Dreams, We'll Bring the Means"

--~--~---------~--~----~------------~-------~--~----~
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