Database design . Beginner having trouble.

2008-12-13 Thread Tanay
I have two database tables. Tenants and expenses. Tenant has many expenses. Expense belongs to tenant. When ever a new expense is created a tenant who has paid for the expense is associated with it. Now i want another relationship which is affects. Each expense may not affect all tenants. So

Re: $this-find not interpreting LIKE

2008-12-10 Thread Tanay
thanks, i will try it On Dec 10, 12:58 pm, AD7six [EMAIL PROTECTED] wrote: On Dec 10, 4:13 am, Tanay [EMAIL PROTECTED] wrote: $expenses=$this-Expense-find('all',array(                                 'conditions'= array(                                      'Expense.Name'='LIKE S

How and where to insert a tracking script. ?

2008-12-10 Thread Tanay
I want to insert a small counter and a login code so that they are run on all cake pages. I am using default theme and css. Tell me the default template file so that i can insert these codes. --~--~-~--~~~---~--~~ You received this message because you are

$this-find not interpreting LIKE

2008-12-09 Thread Tanay
$expenses=$this-Expense-find('all',array( 'conditions'= array( 'Expense.Name'='LIKE S%' ))); the query generated from sql dump: SELECT `Expense`.`id`, `Expense`.`name`, `Expense`.`description`, `Expense`.`amount`,

Re: ORM, fetching related rows of corresponding model: undefined index..

2008-12-08 Thread Tanay
no sight of 'answers' still On Dec 8, 4:10 pm, Tanay [EMAIL PROTECTED] wrote: i changed the value to 2, still the var_ dump is like this: array(2) { [0]= array(1) { [Question]= array(5) { [id]= string (1) 1 [question]= string(22) Why do you use CakePHP [questioner]= string(5) Ahsan

Re: ORM, fetching related rows of corresponding model: undefined index..

2008-12-08 Thread Tanay
= 'all'? Should be set to an integerhttp://book.cakephp.org/view/439/recursive On Dec 7, 7:19 pm, Tanay [EMAIL PROTECTED] wrote: i have done that.. here is my full questions_controller.php     ?php     class QuestionsController extends AppController {        var $name = 'Questions

Re: ORM, fetching related rows of corresponding model: undefined index..

2008-12-08 Thread Tanay
' to 'models/answer.php'. Everthing else looks ok. hth grigri On Dec 8, 11:11 am, Tanay [EMAIL PROTECTED] wrote: no sight of 'answers' still On Dec 8, 4:10 pm, Tanay [EMAIL PROTECTED] wrote: i changed the value to 2, still the var_ dump is like this: array(2) { [0]= array(1

sending parameters to a controller function

2008-12-08 Thread Tanay
i have a class type expenses the index() function of controller lists all expenses' then i have a function show(month,year) which lists all expenses of that particular month,year in expenses home page i want to have a form with two select buttons such that i select month and year with values,

Re: ORM, fetching related rows of corresponding model: undefined index..

2008-12-07 Thread Tanay
are doing your associations correctly, or if they are spelled correctly. On Dec 6, 9:50 pm, Tanay [EMAIL PROTECTED] wrote: it seems no relationships are working with my cakephp. has it got anything to do with my version of php5? i have got struck at this for a long time. help will be very

Re: ORM, fetching related rows of corresponding model: undefined index..

2008-12-07 Thread Tanay
' = 1))); On Dec 7, 9:55 am, Tanay [EMAIL PROTECTED] wrote: MODEL answers.php     ?php     class Answer extends AppModel {        var $name = 'Answer';        var $belongsTo = array(           'Question' = array(              'className'    = 'Question

Re: ORM, fetching related rows of corresponding model: undefined index..

2008-12-06 Thread Tanay
Tanay wrote: i have two dbs questions , and answers.. corresponding models questions has many answers answers belogns to questions in questions_controller, i have this home function function home() { $this-Question-recursive = 1; $this-set('questions

Re: ORM, fetching related rows of corresponding model: undefined index..

2008-12-06 Thread Tanay
, that or in the view do a pr($questions) before the foreach this will display the array and see what exactly what is in the array. On Dec 6, 9:40 am, Tanay [EMAIL PROTECTED] wrote: Tanay wrote: i have two dbs questions , and answers.. corresponding models questions has many answers

ORM, fetching related rows of corresponding model: undefined index..

2008-12-03 Thread Tanay
i have two dbs questions , and answers.. corresponding models questions has many answers answers belogns to questions in questions_controller, i have this home function function home() { $this-Question-recursive = 1; $this-set('questions', $this-Question-find('all'));

Newbie facing an error

2008-11-27 Thread Tanay
Warning: file_put_contents(/f1/content/cakeme/public/myapp/app/tmp/ cache/models/default_cake_list) [function.file-put-contents]: failed to open stream: Permission denied in /f1/content/cakeme/public/myapp/ cake/basics.php on line 936 Warning: