Re: Problem with saving form data... from tutorial...

2007-06-18 Thread LoinSees

define('DEBUG', 1);

On Jun 18, 5:50 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 6/18/07, LoinSees <[EMAIL PROTECTED]> wrote:
>
>
>
> > :P I have tried that about 1 million times. (about 6 times in reality,
> > but it feels like a million.)
> > This thing is driving me nuts.
>
> What value do you have debug in config/core.php set to?  If it's set
> to 0 you might be seeing cached results.  Just a thought.
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> @TheBallpark -http://www.littlehart.net/attheballpark
> @TheKeyboard -http://www.littlehart.net/atthekeyboard


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Problem with saving form data... from tutorial...

2007-06-17 Thread LoinSees

:P I have tried that about 1 million times. (about 6 times in reality,
but it feels like a million.)
This thing is driving me nuts.

On Jun 17, 6:05 am, aerosmith <[EMAIL PROTECTED]> wrote:
> Try starting the tutorial on a fresh installation or download the
> source code then compare.
>
> On Jun 17, 12:42 am, LoinSees <[EMAIL PROTECTED]> wrote:
>
> > Nope... still not working...
>
> > PS. you forgot the $ in:
> > if(this->Task->saveField('done', 1))
> > Should be:
> > if($this->Task->saveField('done', 1))
>
> > I changed it but it still didnt work...
>
> > On Jun 16, 8:01 am,aerosmith<[EMAIL PROTECTED]> wrote:
>
> > > Your complete function will look like this.
>
> > >  > > function done($id = null)
> > > {
> > > $this->Task->id = $id;
> > > if(this->Task->saveField('done', 1))
> > > {
> > > $this->set('data', $this->Task->findAll());
> > > $this->render('done', 'ajax');
> > > }
> > > }
> > >   ?>
>
> > > Regards
> > > Raffi Hovhannesian
>
> > > On Jun 15, 2:27 am, LoinSees <[EMAIL PROTECTED]> wrote:
>
> > > > Hello,
> > > > I have been trying to do this tutorial for a while, but keep failing
> > > > (http://grahambird.co.uk/cake/tutorials/ajax.php)
> > > > I have managed to identify the problem thought... it does not save to
> > > > the database once you click the checkbox.
> > > > Here is a small part of tasks_controller.php:
>
> > > > function done($id = null)
> > > > {
> > > > // move task from todo to done
> > > > $this->Task->id = $id;
> > > > $this->params['data']['Task']['done'] = 1;
> > > > if ($this->Task->save($this->params['data']))
> > > > {
> > > > $this->set('data', $this->Task->findAll());
> > > > $this->render('done', 'ajax');
> > > > }
> > > > }
>
> > > > Can someone tell me what is wrong here?
> > > > Thanks, Loin Sees.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Problem with saving form data... from tutorial...

2007-06-16 Thread LoinSees

Nope... still not working...

PS. you forgot the $ in:
if(this->Task->saveField('done', 1))
Should be:
if($this->Task->saveField('done', 1))

I changed it but it still didnt work...

On Jun 16, 8:01 am, aerosmith <[EMAIL PROTECTED]> wrote:
> Your complete function will look like this.
>
>  function done($id = null)
> {
> $this->Task->id = $id;
> if(this->Task->saveField('done', 1))
> {
> $this->set('data', $this->Task->findAll());
> $this->render('done', 'ajax');
> }
> }
>   ?>
>
> Regards
> Raffi Hovhannesian
>
> On Jun 15, 2:27 am, LoinSees <[EMAIL PROTECTED]> wrote:
>
> > Hello,
> > I have been trying to do this tutorial for a while, but keep failing
> > (http://grahambird.co.uk/cake/tutorials/ajax.php)
> > I have managed to identify the problem thought... it does not save to
> > the database once you click the checkbox.
> > Here is a small part of tasks_controller.php:
>
> > function done($id = null)
> > {
> > // move task from todo to done
> > $this->Task->id = $id;
> > $this->params['data']['Task']['done'] = 1;
> > if ($this->Task->save($this->params['data']))
> > {
> > $this->set('data', $this->Task->findAll());
> > $this->render('done', 'ajax');
> > }
> > }
>
> > Can someone tell me what is wrong here?
> > Thanks, Loin Sees.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Problem with saving form data... from tutorial...

2007-06-15 Thread LoinSees

Nope... still not working sorry

On Jun 15, 12:54 am, metasan <[EMAIL PROTECTED]> wrote:
> Hi,
>
> i checked your code, and i think the error is at that line :
>
> $this->Task->id = $id;
>
> Task is a model so you should read it first.
> Plus you make Task->id, this is wrong if you want the task id you
> should do
>
>  $this->Task['id'] = $id;
>
> after reading the Task table.
>
> Let me know the result.
>
> Regards,
>
> metasan
>
> http://www.piegteam.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Problem with saving form data... from tutorial...

2007-06-15 Thread LoinSees

There is no validation. This is straight from the tutorial found at
http://grahambird.co.uk/cake/tutorials/ajax.php .
Any ideas why it dosnt work? Has anyone tried this tutorial with the
current version of cakephp?
This is so frustrating!

On Jun 14, 10:44 pm, francky06l <[EMAIL PROTECTED]> wrote:
> Nothing seems wrong to me, but did you set some validations into your
> model ? If so maybe a field does not match the validation (ie :
> NOTEMPTY).
> Try to use $this->Task->save($this->params['data'],
> false).
> Adding false will save without validating the data.
>
> On Jun 15, 1:27 am, LoinSees <[EMAIL PROTECTED]> wrote:
>
> > Hello,
> > I have been trying to do this tutorial for a while, but keep failing
> > (http://grahambird.co.uk/cake/tutorials/ajax.php)
> > I have managed to identify the problem thought... it does not save to
> > the database once you click the checkbox.
> > Here is a small part of tasks_controller.php:
>
> > function done($id = null)
> > {
> > // move task from todo to done
> > $this->Task->id = $id;
> > $this->params['data']['Task']['done'] = 1;
> > if ($this->Task->save($this->params['data']))
> > {
> > $this->set('data', $this->Task->findAll());
> > $this->render('done', 'ajax');
> > }
> > }
>
> > Can someone tell me what is wrong here?
> > Thanks, Loin Sees.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Problem with saving form data... from tutorial...

2007-06-14 Thread LoinSees

Hello,
I have been trying to do this tutorial for a while, but keep failing
(http://grahambird.co.uk/cake/tutorials/ajax.php)
I have managed to identify the problem thought... it does not save to
the database once you click the checkbox.
Here is a small part of tasks_controller.php:

function done($id = null)
{
// move task from todo to done
$this->Task->id = $id;
$this->params['data']['Task']['done'] = 1;
if ($this->Task->save($this->params['data']))
{
$this->set('data', $this->Task->findAll());
$this->render('done', 'ajax');
}
}

Can someone tell me what is wrong here?
Thanks, Loin Sees.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---