Re: HABTM and 1.3 version

2010-05-19 Thread John Andersen
Please provide more information!
What does you data structure look like just before you are saving
them?
How are you trying to save the data - save or saveAll?
Enjoy,
   John

On May 18, 7:35 pm, Ziki zixw...@gmail.com wrote:
 I have problems with HABTM associations, i did everything like it is
 recommended, and try other behaviors for inserting HABTM, but nothing
 of that not working. I am using that in my plugin, if I use 
 thishttp://bakery.cakephp.org/leafs/view/23or 
 thishttp://bakery.cakephp.org/articles/view/add-delete-habtm-behaviorI
 cannot use any of those functions, and error is same, it says that;
 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 'addAssoc' at line 1 [CORE/cake/libs/model/
 datasources/dbo_source.php, line 666]

 Query: addAssoc

 And I tried at 100 ways, but all the time reuslt is same.

 I dont know what to do anymore, I have everything ok, and models, and
 tables, and I just want to add data in HABTM tables.

 Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
 their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: HABTM and 1.3 version

2010-05-19 Thread Ziki
part of used model Accommodation
echo $form-input(rates,array(type = text));
part of HABTM model
echo $form-input(Facility.Facility));

and I used $this-save() not saveAll

and I tried lot of things but without succes, now I made it by myself,
i just put in HABTM table that what i need and that is that, but that
is not good solution :(

On 19 svi, 09:13, John Andersen j.andersen...@gmail.com wrote:
 Please provide more information!
 What does you data structure look like just before you are saving
 them?
 How are you trying to save the data - save or saveAll?
 Enjoy,
    John

 On May 18, 7:35 pm, Ziki zixw...@gmail.com wrote:



  I have problems with HABTM associations, i did everything like it is
  recommended, and try other behaviors for inserting HABTM, but nothing
  of that not working. I am using that in my plugin, if I use 
  thishttp://bakery.cakephp.org/leafs/view/23orthishttp://bakery.cakephp.org/articles/view/add-delete-habtm-behaviorI
  cannot use any of those functions, and error is same, it says that;
  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 'addAssoc' at line 1 [CORE/cake/libs/model/
  datasources/dbo_source.php, line 666]

  Query: addAssoc

  And I tried at 100 ways, but all the time reuslt is same.

  I dont know what to do anymore, I have everything ok, and models, and
  tables, and I just want to add data in HABTM tables.

  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
  with their CakePHP related questions.

  You received this message because you are subscribed to the Google Groups 
  CakePHP group.
  To post to this group, send email to cake-php@googlegroups.com
  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group 
  athttp://groups.google.com/group/cake-php?hl=en

 Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
 their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: HABTM and 1.3 version

2010-05-19 Thread John Andersen
What I meant by the structure is to use debug($this-data) and then
post the result here, so we can see the structure and tell whether it
is a valid one for HABTM. Can you do that?
Enjoy,
   John

On May 19, 3:29 pm, Ziki zixw...@gmail.com wrote:
 part of used model Accommodation
 echo $form-input(rates,array(type = text));
 part of HABTM model
 echo $form-input(Facility.Facility));

 and I used $this-save() not saveAll

 and I tried lot of things but without succes, now I made it by myself,
 i just put in HABTM table that what i need and that is that, but that
 is not good solution :(

 On 19 svi, 09:13, John Andersen j.andersen...@gmail.com wrote:



  Please provide more information!
  What does you data structure look like just before you are saving
  them?
  How are you trying to save the data - save or saveAll?
  Enjoy,
     John

  On May 18, 7:35 pm, Ziki zixw...@gmail.com wrote:

   I have problems with HABTM associations, i did everything like it is
   recommended, and try other behaviors for inserting HABTM, but nothing
   of that not working. I am using that in my plugin, if I use 
   thishttp://bakery.cakephp.org/leafs/view/23orthishttp://bakery.cakephp.or...
   cannot use any of those functions, and error is same, it says that;
   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 'addAssoc' at line 1 [CORE/cake/libs/model/
   datasources/dbo_source.php, line 666]

   Query: addAssoc

   And I tried at 100 ways, but all the time reuslt is same.

   I dont know what to do anymore, I have everything ok, and models, and
   tables, and I just want to add data in HABTM tables.

   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
   with their CakePHP related questions.

   You received this message because you are subscribed to the Google Groups 
   CakePHP group.
   To post to this group, send email to cake-php@googlegroups.com
   To unsubscribe from this group, send email to
   cake-php+unsubscr...@googlegroups.com For more options, visit this group 
   athttp://groups.google.com/group/cake-php?hl=en

  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
  with their CakePHP related questions.

  You received this message because you are subscribed to the Google Groups 
  CakePHP group.
  To post to this group, send email to cake-php@googlegroups.com
  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group 
  athttp://groups.google.com/group/cake-php?hl=en

 Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
 their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: HABTM and 1.3 version

2010-05-19 Thread Ziki
Oh I found mistakes, it was with name of model, it was missing one M
in Accommodation :)) know editing and adding works


But I have another question, how to add one or more field in view file
which is  from HABTM table, so if I want to add in that HABTM table
status field, how to make it in view file, like checkbox?

I have model

Accommodation
Facilities
AccommodationsFacility
id,accommodation_id,facility_id,status

How to add this status field, like checkbox?

On 19 svi, 15:40, John Andersen j.andersen...@gmail.com wrote:
 What I meant by the structure is to use debug($this-data) and then
 post the result here, so we can see the structure and tell whether it
 is a valid one for HABTM. Can you do that?
 Enjoy,
    John

 On May 19, 3:29 pm, Ziki zixw...@gmail.com wrote:



  part of used model Accommodation
  echo $form-input(rates,array(type = text));
  part of HABTM model
  echo $form-input(Facility.Facility));

  and I used $this-save() not saveAll

  and I tried lot of things but without succes, now I made it by myself,
  i just put in HABTM table that what i need and that is that, but that
  is not good solution :(

  On 19 svi, 09:13, John Andersen j.andersen...@gmail.com wrote:

   Please provide more information!
   What does you data structure look like just before you are saving
   them?
   How are you trying to save the data - save or saveAll?
   Enjoy,
      John

   On May 18, 7:35 pm, Ziki zixw...@gmail.com wrote:

I have problems with HABTM associations, i did everything like it is
recommended, and try other behaviors for inserting HABTM, but nothing
of that not working. I am using that in my plugin, if I use 
thishttp://bakery.cakephp.org/leafs/view/23orthishttp://bakery.cakephp.or...
cannot use any of those functions, and error is same, it says that;
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 'addAssoc' at line 1 [CORE/cake/libs/model/
datasources/dbo_source.php, line 666]

Query: addAssoc

And I tried at 100 ways, but all the time reuslt is same.

I dont know what to do anymore, I have everything ok, and models, and
tables, and I just want to add data in HABTM tables.

Check out the new CakePHP Questions 
sitehttp://cakeqs.organdhelpotherswith their CakePHP related questions.

You received this message because you are subscribed to the Google 
Groups CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this 
group athttp://groups.google.com/group/cake-php?hl=en

   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
   with their CakePHP related questions.

   You received this message because you are subscribed to the Google Groups 
   CakePHP group.
   To post to this group, send email to cake-php@googlegroups.com
   To unsubscribe from this group, send email to
   cake-php+unsubscr...@googlegroups.com For more options, visit this group 
   athttp://groups.google.com/group/cake-php?hl=en

  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
  with their CakePHP related questions.

  You received this message because you are subscribed to the Google Groups 
  CakePHP group.
  To post to this group, send email to cake-php@googlegroups.com
  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group 
  athttp://groups.google.com/group/cake-php?hl=en

 Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
 their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


HABTM and 1.3 version

2010-05-18 Thread Ziki
I have problems with HABTM associations, i did everything like it is
recommended, and try other behaviors for inserting HABTM, but nothing
of that not working. I am using that in my plugin, if I use this
http://bakery.cakephp.org/leafs/view/23 or this
http://bakery.cakephp.org/articles/view/add-delete-habtm-behavior I
cannot use any of those functions, and error is same, it says that;
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 'addAssoc' at line 1 [CORE/cake/libs/model/
datasources/dbo_source.php, line 666]

Query: addAssoc

And I tried at 100 ways, but all the time reuslt is same.

I dont know what to do anymore, I have everything ok, and models, and
tables, and I just want to add data in HABTM tables.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en