Model associations are just an extension a properly normalised
database so if you have those tables in your database then each one
needs a model and you use associations to link those models together
in the appropriate manner.
This is fundamental stuff and is all explained in the book, I suggest
thanks for all the answers.
i want to achieve this:
whenever the save() process failed, not matter what the reason was (db
connection, missing field in db, code error etc. etc.), I need to
know!
so i created a test case with a fake field that does not exist in my
table, so i make sure that
You should use is_array and is_empty to check your return value. Also i would
recommend to pass your return value to the view and look at it with
debug($updated);
-flosky
Tomfox Wiranata tomfox.wiran...@gmail.com schrieb:
thanks for all the answers.
i want to achieve this:
whenever the
Unfortunately, mocked behaviors does not work =(
$Model-Behavior-expects(..)-method('method')-will($this-returnValue('value'))
does not replace return value of required method, so when 'metod' is called
it works 'as is' instead of returning 'value'
--
Our newest site for the community:
Thanks for reply.
Actually I have some checks like
if (!class_exists('RatePlanMock')) {...}
they were removed to simplify code (and it actually works when there is only
1 test)
User and RatePlan classes were imported also
Trick was in 2nd argument of $this-getMock(). It appeared that for
You would need to use MySQL's COUNT() and GROUP BY functions to
achieve that at a database level.
HTH, Paul.
On Oct 7, 11:27 am, Xoubaman xouba...@gmail.com wrote:
Missclicked publish when writing ¬¬
The point is get the desired array without looping through the entire first
array.
Maybe
but flash message in auth or other action is work
thankyou
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this
so what exactly do you want from us?^^
On 10 Okt., 14:53, taqman filler taqman...@gmail.com wrote:
but flash message in auth or other action is work
thankyou
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site
I need to fix it
2011/10/10 euromark dereurom...@googlemail.com:
so what exactly do you want from us?^^
On 10 Okt., 14:53, taqman filler taqman...@gmail.com wrote:
but flash message in auth or other action is work
thankyou
--
Our newest site for the community: CakePHP Video Tutorials
Hi – I'd like to create an exceptions.php file with all my application
exceptions, just like it is explained in the cook book:
http://book.cakephp.org/2.0/en/development/exceptions.html?highlight=exceptions#creating-your-own-application-exceptions
The cookbook doesn't say where to place those
Hi everybody,
I'm trying to create a simple cakephp application which handles posts
and comments (like the one presented in the tutorial); I have a Post
model which *hasMany* Comments, and I have a Comment which *belongsTo*
to a Post.
I would like to use Post-hasMany['fields'] variable to reduce
Hi
Please anyone can tell me how to develop multilingual site in cake
php
thanks.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To
On Oct 7, 5:56 pm, Bruno Binci bbi...@gmail.com wrote:
Hola, Estoy intentando hacer una paginacion de 2 tablas, el tema es el
siguiente:
tengo que mostrar el contenido de la tabla ordenado de esta manera:
today-present/future-past obviamente ordenándolo por fechas.
Tuve una idea de
Hi all.
i'm having some troubles with Cake 2.0 + SQLServer datasource
i'm getting a Sqlserver requires a database connection error every time i
use the external_db config.
here's my database.php
class DATABASE_CONFIG {
public $default = array(
datasource = Database/Mysql,
persistent = false,
Hi,
I am working on my default.ctp, where I included an element with an
contact form which is using a captcha code.
On every page, regardless where I am on my project, I can click on the
header contact link and open a popup with my contact form. This
contact link is located in my default.ctp
But
If i understand correctly you want to set the variable so it is available to
any view.
You can put your code in the AppController.php to achieve just that.
-flosky
heohni heidi.anselstet...@consultingteam.de schrieb:
Hi,
I am working on my default.ctp, where I included an element with an
in beforeRender() in your app controller
also make sure $this-MathCaptcha is available!
On 10 Okt., 17:54, flo.kl...@googlemail.com
flo.kl...@googlemail.com wrote:
If i understand correctly you want to set the variable so it is available to
any view.
You can put your code in the
I tried using issue tracking software in the past, but a lot of those
were too complicated and heavy. Using emails or Google docs is a big
NO as well. Can't keep track with those.
So, I decided to create my own issue tracking software - something
light, idiot proof, and intuitive where you can
I'm still trying to figure out how to get function __ construct() to
work properly for me, it throws errors when used the way I
traditionally used it. I'm also still unsure whether I should be using
App::import() or App::uses(). I would tend to think App::import() but
like I said I'm a little
i am keen to check it out once its stable
yes - email and docs are not suitable for issue tracking, of course.
but i can tell you - i wouldnt create my own issue tracker if not
absolute necessary
there are already enough bugs in your current software you are
working on.
why spending all your
If its for models, use ClassRegistry::init().
If you are including files, use App::import().
If you are adding a file to the lookup, use App::uses().
https://github.com/cakephp/cakephp/blob/2.0/lib/Cake/Core/App.php#L549
On Oct 10, 9:20 am, CrotchFrog crotchf...@gmail.com wrote:
I'm still
I'm trying to load Facebook's php sdk. I'm currently using App::import.
I'm loading it into the App Controller but the problem I'm having now is
that the class is only available within that controller and not accessible
to the rest of my controllers.
- Ed
On Mon, Oct 10, 2011 at 9:12 PM, Miles J
I've recently been working on a project for a client. Its a simple E-
Commerce site and I decided to use Sessions for the cart.
I got everything set-up and working 100% on my local dev area, but for
some reason when I went over to the server the sessions are not
carrying...
I set-up a test under
Hello,
Is there a way to implement this scenario:
Post is written in locale EN, if locale FR is selected, and there is
no FR translation available for the Post, return nothing.
Currently it returns the default fields found in the posts table.
I'd guess that first, there should be a way to
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Larry E. Masters
Sent: Monday, October 03, 2011 1:28 AM
To: cake-php@googlegroups.com
Subject: CakeFest 2011 videos
I have started uploading videos from CakeFest 2011. Over the next few days I
will release
You could always just include it as a 'require_once' in the bootstrap.
On Oct 11, 12:24 pm, Ed Propsner crotchf...@gmail.com wrote:
I'm trying to load Facebook's php sdk. I'm currently using App::import.
I'm loading it into the App Controller but the problem I'm having now is
that the class
You could always use a 'require_once' in bootstrap.
On Oct 11, 12:24 pm, Ed Propsner crotchf...@gmail.com wrote:
I'm trying to load Facebook's php sdk. I'm currently using App::import.
I'm loading it into the App Controller but the problem I'm having now is
that the class is only available
Hi Matteo, this is not a bug. Cake requires the post_id field to
fetch the associated Post associated array
as well, hence even when you don't mention it, the PRIMARY and
FOREIGN key fields are always mentioned.
On Oct 10, 3:26 am, Matteo Landi landima...@gmail.com wrote:
Hi everybody,
I'm
I've been using Mantis for about three years. I love it, my clients love it,
it's free, I can brand it and my work gets done much faster.
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 10 Oct 2011, at 22:46, euromark wrote:
i am keen to check it out once its stable
yes - email
Hi,
There is situation that user update their profile. But, users cannot
view the changes until admin approve it. Is it i need to use
temporary table for data update by user? Or any other idea to
implement this?
Thanks.
nOLL
--
Our newest site for the community: CakePHP Video Tutorials
I ran into a fatal error on my home page.
Fatal error: Call to a member function here() on a non-object in C:
\Development\cake_files\cake_2.0.0-rc3\lib\Cake\Error
\ExceptionRenderer.php on line 182
Not sure what to do about it as it's a core issue.
Is there something I'm missing?
31 matches
Mail list logo