# |
Aug 8th 2008, 16:54 |
TommyO |
zmonteca: well, pr() will do a cleaenr print_r() and debug() will give you a little more info |
# |
Aug 8th 2008, 16:54 |
zmonteca |
TommyO: cool. thanks. I was just accessing when i needed to debug, but that looks a lot better. |
# |
Aug 8th 2008, 16:54 |
TommyO |
zmonteca: do you get a 200 with a blank page or a 404? |
# |
Aug 8th 2008, 16:54 |
teknoid |
yoris: secondly checking if a field exists or not is better done by using $validate array and isUnique rule |
# |
Aug 8th 2008, 16:53 |
zmonteca |
TommyO: however, firebug tells me the request is '/admins/users/facilities_list' |
# |
Aug 8th 2008, 16:53 |
TommyO |
zmonteca: you also never need to use the php globals, like $_POST. cake puts them in better places for you. try debug($this->params); instead |
# |
Aug 8th 2008, 16:53 |
teknoid |
yoris: what you should really do, is transform the CSV data into array data that models would expect and save it that way |
# |
Aug 8th 2008, 16:53 |
zmonteca |
TommyO: it's as thought that method isn't called. |
# |
Aug 8th 2008, 16:52 |
zmonteca |
TommyO: correct. my sql isn't executed either. |
# |
Aug 8th 2008, 16:52 |
yoris |
teknoid, if the csv contains a CountryCode (CC) that already is in the DB it skips it and goes to the AreaCode part of the csv record |
# |
Aug 8th 2008, 16:52 |
TommyO |
I see though. you're saying the echo never happens? |
# |
Aug 8th 2008, 16:51 |
TommyO |
but if you did need it, the proper syntax would be $this->layout |
# |
Aug 8th 2008, 16:51 |
TommyO |
you don't need it with RequestHandler |
# |
Aug 8th 2008, 16:51 |
yoris |
teknoid, assos between them are ok, like this CountryCode->AreaCode->LocalCode |
# |
Aug 8th 2008, 16:51 |
TommyO |
zmonteca: well, setting a variable to $layout won't do anything |
# |
Aug 8th 2008, 16:51 |
zmonteca |
TommyO: that's insightful |
# |
Aug 8th 2008, 16:51 |
Azhi_Dahaka_ |
not search, look up |
# |
Aug 8th 2008, 16:50 |
yoris |
teknoid, they are working as they should be |
# |
Aug 8th 2008, 16:50 |
Azhi_Dahaka_ |
i just don't see it with pr($this->params) in the controller... |
# |
Aug 8th 2008, 16:50 |
yoris |
teknoid, three diff Models |
# |
Aug 8th 2008, 16:50 |
yoris |
teknoid, each csv is a CountryCode, AreaCode, LocalCode |
# |
Aug 8th 2008, 16:50 |
Azhi_Dahaka_ |
how can i search for the _method hidden field outputted by $form->create? |
# |
Aug 8th 2008, 16:50 |
yoris |
teknoid, csv input of Country, Area and Local Codes |
# |
Aug 8th 2008, 16:49 |
teknoid |
yoris: what am i looking at? |
# |
Aug 8th 2008, 16:49 |
zmonteca |
TommyO: i agree, it's a MESS |
# |
Aug 8th 2008, 16:49 |
TommyO |
your controller is way too heavy imho |
# |
Aug 8th 2008, 16:48 |
zmonteca |
TommyO: thanks...this is my first cake project...any insights are appreciated. |
# |
Aug 8th 2008, 16:48 |
yoris |
teknoid, http://bin.cakephp.org/view/1193091440 |
# |
Aug 8th 2008, 16:48 |
TommyO |
zmonteca: but both of them smell of component or model anyway |
# |
Aug 8th 2008, 16:47 |
TommyO |
zmonteca: I assume same with setAccountType |
# |
Aug 8th 2008, 16:47 |
Howard`` |
Thanks teknoid |
# |
Aug 8th 2008, 16:47 |
teknoid |
Howard``: 'group'=>'fieldname' |
# |
Aug 8th 2008, 16:47 |
TommyO |
zmonteca: make getAccountType begin with a _ to protect it from the url |
# |
Aug 8th 2008, 16:46 |
yoris |
thats my guess too |
# |
Aug 8th 2008, 16:46 |
teknoid |
yoris: could you bin some code because i have a feeling you are doing something very simple, with an overly complex approach |
# |
Aug 8th 2008, 16:46 |
zmonteca |
method is all the way at the bottom - admins_facilities_list - in controller. |
# |
Aug 8th 2008, 16:45 |
teknoid |
TommyO: not as good as i expect, because i almost forgot ;) |
# |
Aug 8th 2008, 16:45 |
zmonteca |
ajax view: http://bin.cakephp.org/view/929282413 |
# |
Aug 8th 2008, 16:45 |
zmonteca |
actions view: http://bin.cakephp.org/view/1560310127 |
# |
Aug 8th 2008, 16:45 |
zmonteca |
controller: http://bin.cakephp.org/view/434481354 |
# |
Aug 8th 2008, 16:44 |
Howard`` |
quick question, is there a way to perform a group by in a findall call? |