# |
Oct 22nd 2009, 19:04 |
joeb |
Oh, what's the array look like? |
# |
Oct 22nd 2009, 19:04 |
Doncode |
when I am showing all cities , I want to get hotel count of that city. |
# |
Oct 22nd 2009, 19:04 |
joeb |
cakenoob: No problem. |
# |
Oct 22nd 2009, 19:04 |
cakenoob |
joeb - thanks for your help - just had a typo... |
# |
Oct 22nd 2009, 19:04 |
Doncode |
2 models hotel , city, - has relations between them . |
# |
Oct 22nd 2009, 19:03 |
joeb |
$this->Model->find('count') ? |
# |
Oct 22nd 2009, 19:03 |
Doncode |
within the query |
# |
Oct 22nd 2009, 19:02 |
Doncode |
I dont know how to get count of other model |
# |
Oct 22nd 2009, 19:02 |
joeb |
Doncode: What's the problem |
# |
Oct 22nd 2009, 19:01 |
Doncode |
joeb : could you check this out .. http://bin.cakephp.org/view/812888311 |
# |
Oct 22nd 2009, 18:59 |
joeb |
cakenoob: Take a look at http://teknoid.wordpress.com/2008/07/11/notes-on-cakephp-habtm-part-2-saving-data/ |
# |
Oct 22nd 2009, 18:58 |
cakenoob |
http://bin.cakephp.org/view/1298880523 |
# |
Oct 22nd 2009, 18:56 |
joeb |
No problem. |
# |
Oct 22nd 2009, 18:56 |
cakenoob |
my bad - new to the irc scene... |
# |
Oct 22nd 2009, 18:55 |
joeb |
~tell cakenoob about bin |
# |
Oct 22nd 2009, 18:55 |
cakenoob |
?> |
# |
Oct 22nd 2009, 18:55 |
cakenoob |
echo $form->input('Users',array("multiple"=>"checkbox",'value'=>$activeUsers)); |
# |
Oct 22nd 2009, 18:55 |
cakenoob |
echo $form->input('Project.completed'); |
# |
Oct 22nd 2009, 18:55 |
cakenoob |
echo $form->input('Project.due_date',array('type'=>'text', 'class'=>'dateInput')); |
# |
Oct 22nd 2009, 18:55 |
cakenoob |
echo $form->input('Project.desc'); |
# |
Oct 22nd 2009, 18:55 |
cakenoob |
echo $form->input('Project.projectName'); |
# |
Oct 22nd 2009, 18:55 |
cakenoob |
echo $form->input('Project.id'); |
# |
Oct 22nd 2009, 18:55 |
cakenoob |
<?php |
# |
Oct 22nd 2009, 18:54 |
cakenoob |
my guess is that my form isn't setup right... |
# |
Oct 22nd 2009, 18:54 |
joeb |
Well, paste the code you're using and we'll check it out; |
# |
Oct 22nd 2009, 18:54 |
cakenoob |
I tried the saveAll() method, but I think I'm not quite doing it right |
# |
Oct 22nd 2009, 18:53 |
cakenoob |
I have - but it seemed to only reference a one to many relationship, not many to many |
# |
Oct 22nd 2009, 18:53 |
cakenoob |
the Project model saves correctly...just not the projects_users |
# |
Oct 22nd 2009, 18:53 |
joeb |
cakenoob: Have you read the book? |
# |
Oct 22nd 2009, 18:53 |
cakenoob |
how do I go about getting it to save that table as it doesn't have a direct model associated with it? |
# |
Oct 22nd 2009, 18:52 |
cakenoob |
I have a form that needs to save data to the table that stores the relationship information between the 2 models (projects_users) |
# |
Oct 22nd 2009, 18:52 |
Doncode |
like newyork(30) |
# |
Oct 22nd 2009, 18:51 |
cakenoob |
sweet - well I have to models that have habtm relationships with eachother (Project and User) |
# |
Oct 22nd 2009, 18:51 |
Doncode |
I want to get hotel count near the city name but could able to put the logic |
# |
Oct 22nd 2009, 18:51 |
joeb |
cakenoob: Don't ask if anyone can help, just ask. |
# |
Oct 22nd 2009, 18:51 |
Doncode |
with requestaction - I am getting showing all the cities with function allcity and pasting them with a li list |
# |
Oct 22nd 2009, 18:50 |
cakenoob |
anyone able to help? |
# |
Oct 22nd 2009, 18:50 |
Doncode |
I am new to cake. I have hotel and city models and their controllers. |
# |
Oct 22nd 2009, 18:50 |
cakenoob |
hey all - got a quick question... |
# |
Oct 22nd 2009, 18:49 |
Doncode |
hi bartek |
# |
Oct 22nd 2009, 18:44 |
Bartek120 |
Doncode: hi |