Re: Model function error

2011-03-02 Thread Tom van den Berk
You have solved my problem! Thank you very much, this was driving me crazy! It is working perfectly now, the name change did the trick. Thanks again for the help and for everybody else who took the time to help me. On 2 mrt, 18:12, Jeremy Burns | Class Outfit wrote: > Rename it invoice_line.php

Re: Model function error

2011-03-02 Thread Jeremy Burns | Class Outfit
Rename it invoice_line.php Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Mar 2011, at 17:10, Tom van den Berk wrote: > This is the file: invoiceline.php > > On 2 mrt, 18:07, Jeremy Burns | Class Outfit > wrote: >> What is the name of the model file? >>

Re: Model function error

2011-03-02 Thread Tom van den Berk
This is the file: invoiceline.php On 2 mrt, 18:07, Jeremy Burns | Class Outfit wrote: > What is the name of the model file? > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakeph

Re: Model function error

2011-03-02 Thread Jeremy Burns | Class Outfit
What is the name of the model file? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Mar 2011, at 16:45, Tom van den Berk wrote: > This is the function call: > > $this -> InvoiceLine -> saveValue($invoiceId, $key, $value); > > This is the MODEL: > > clas

Re: Model function error

2011-03-02 Thread Tom van den Berk
This is the function call: $this -> InvoiceLine -> saveValue($invoiceId, $key, $value); This is the MODEL: array ( 'className' => 'Invoice', 'foreignKey' => 'invoice_id' ) ); public function saveValue($invoiceI

Re: Model function error

2011-03-02 Thread Tilen Majerle
ERROR: SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'saveValue' at line 1 you for sure don't have function in a right model, or you call it wrong... -- Lep pozdrav, Tilen Majerle http://maje

Re: Model function error

2011-03-02 Thread Jeremy Burns | Class Outfit
It's hard to say from all that html, but maybe you are calling a function saveValue that does not exist in the model. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Mar 2011, at 15:57, Tom van den Berk wrote: > If you would have read the question properly

Re: Model function error

2011-03-02 Thread Tom van den Berk
If you would have read the question properly, you would have known the function is of no consequence. The fact that the function name is passed as SQL is. The function is never even reached because a die(); in the first line has no effect. If something is not clear, please ask me in a normally, or

RE: Model function error

2011-03-02 Thread Krissy Masters
: CakePHP Subject: Model function error Hello Everybody, I am having a problem with CakePHP models. I have several in use but only one gives me an error when i add a function and call it from a controller. I have a model called Invoice with a saveValue function which works like a charm. I also have

Model function error

2011-03-02 Thread Tom van den Berk
Hello Everybody, I am having a problem with CakePHP models. I have several in use but only one gives me an error when i add a function and call it from a controller. I have a model called Invoice with a saveValue function which works like a charm. I also have model with the same function but this

Re: Apress Beginning CakePHP Model Function Error

2008-09-20 Thread villas
I believe quite recently the syntax was changed and comparison operators etc should now be placed in the left-hand side of the array. I think this was done for security to reduce chances of SQL injection. In that respect, I think you may have found a place where the book may be a little out of

Re: Apress Beginning CakePHP Model Function Error

2008-09-19 Thread gmwebs
If you are using the new v1.2 RC2 of Cake then quite a few of the older functions have been deprecated (like the findAll() one) and the syntax for some of them has also changed - i.e. find('all') - it seems that the book is written for this new syntax. If you uprade your Cake version to the latest

Apress Beginning CakePHP Model Function Error

2008-09-18 Thread jabocs
I am going through the Apress book, and I ran across an issue that I had to use the Cake API to resolve. (For Reference in book.. this is on page 106) The function it gave me to put into the Post model for the blog application is as follows: function findByYear($year=null) { $date = $year.