# |
Oct 22nd 2009, 16:09 |
brookshire |
i would do the validation in the controller: and that is incorect |
# |
Oct 22nd 2009, 16:09 |
brookshire |
but i'm thinking that is specific to the model yeah |
# |
Oct 22nd 2009, 16:08 |
brookshire |
of course you still need a view |
# |
Oct 22nd 2009, 16:08 |
brookshire |
i would do the validation in the controller |
# |
Oct 22nd 2009, 16:08 |
dogmatic69 |
alan|macbook: later |
# |
Oct 22nd 2009, 16:08 |
arz |
sorry |
# |
Oct 22nd 2009, 16:08 |
arz |
brookshire, the model itself |
# |
Oct 22nd 2009, 16:08 |
dogmatic69 |
jessica-m: just delete them manualy first then |
# |
Oct 22nd 2009, 16:08 |
alan|macbook |
bye all |
# |
Oct 22nd 2009, 16:07 |
alan|macbook |
enough for tonight. thanks again dogmatic69. |
# |
Oct 22nd 2009, 16:06 |
brookshire |
only works against $this->data |
# |
Oct 22nd 2009, 16:06 |
brookshire |
i believe $validates ignores any db structure |
# |
Oct 22nd 2009, 16:06 |
arz |
brookshire, not that, i'm trying to validate the input from controller (user submitted data) ... well ... if i move all the model code to function can that help? |
# |
Oct 22nd 2009, 16:06 |
brookshire |
i would pull the data from the webservice, then format it like cakephp likes it in the array, save to $this->data, and finally run $this->model->validates() |
# |
Oct 22nd 2009, 16:05 |
jessica-m |
it never deletes them, so its just ending up with tons of the same group per user every time the record is saved |
# |
Oct 22nd 2009, 16:04 |
jessica-m |
INSERT INTO `auth_groups_users` (`user_id`,`group_id`) VALUES (170,'5') |
# |
Oct 22nd 2009, 16:04 |
jessica-m |
its a HABTM rel, its just generating the insert |
# |
Oct 22nd 2009, 16:04 |
brookshire |
arz: so you are trying to validate data that you are pulling correct? |
# |
Oct 22nd 2009, 16:03 |
dogmatic69 |
jessica-m: what sql is cake making |
# |
Oct 22nd 2009, 16:03 |
dogmatic69 |
mine is also and it works |
# |
Oct 22nd 2009, 16:03 |
dogmatic69 |
hmm |
# |
Oct 22nd 2009, 16:03 |
arz |
brookshire, yep, i tried validate, tried to use _schema, nothing it just handles any request |
# |
Oct 22nd 2009, 16:02 |
jessica-m |
does that matter? |
# |
Oct 22nd 2009, 16:01 |
jessica-m |
myisam |
# |
Oct 22nd 2009, 16:01 |
brookshire |
but validates should work for every form post |
# |
Oct 22nd 2009, 16:01 |
brookshire |
arz: i don't think it is possible to easily validate data that you pull |
# |
Oct 22nd 2009, 16:01 |
dogmatic69 |
storage engine |
# |
Oct 22nd 2009, 16:00 |
jessica-m |
not sure what you mean by what type of table is it |
# |
Oct 22nd 2009, 16:00 |
jessica-m |
auth_groups_users |
# |
Oct 22nd 2009, 16:00 |
dogmatic69 |
jessica-m: long shot, what type of table is it? |
# |
Oct 22nd 2009, 16:00 |
Ceeram |
lol |
# |
Oct 22nd 2009, 16:00 |
brookshire |
arz: var $validates ? |
# |
Oct 22nd 2009, 15:59 |
jessica-m |
any other ideas why it wouldnt be deleting? |
# |
Oct 22nd 2009, 15:59 |
dogmatic69 |
Ceeram: need sleep |
# |
Oct 22nd 2009, 15:58 |
arz |
Hello All, using Curl model from http://bakery.cakephp.org/articles/view/curl-model (model is tableless), controller name is searches, form input name in view is search, the question is how do i validate input data? |
# |
Oct 22nd 2009, 15:58 |
jessica-m |
i have debug on and i am looking at the queries |
# |
Oct 22nd 2009, 15:58 |
jessica-m |
its not even trying to delete |
# |
Oct 22nd 2009, 15:58 |
jessica-m |
yes! |
# |
Oct 22nd 2009, 15:57 |
Ceeram |
dogmatic69: the channel doesnt have autocomplete ;) : dogmatic69> does cake un and pw have del priv in mysql? |
# |
Oct 22nd 2009, 15:56 |
jessica-m |
its just inserting |
# |
Oct 22nd 2009, 15:56 |
jessica-m |
its never deleting |