Re: how to all a function from a controller action

2011-03-05 Thread martin
thank you very much! On 4 Mrz., 19:01, cricket zijn.digi...@gmail.com wrote: On Fri, Mar 4, 2011 at 11:24 AM, martin mschenk@gmail.com wrote: hi i'm new to cakephp, but i know about php. i didn't get the mvc concept 100% up to now, sorry. where do i have to place a function which i

Need help with find paginate syntax

2011-03-05 Thread heohni
Hi, $payments = $this-Member-Payment-find('all', array( 'conditions' = array( 'Payment.member_id' = $id ), 'order' = array('Payment.created DESC') )); I would like to paginate this result, how can I do this? I find it difficult to

Re: Need help with find paginate syntax

2011-03-05 Thread jeet bajaj
I think you have to use pagination on Payment model, inside the member controller If it is, then i will suggest the following code, if it can help. class MembersController extends AppController { var $uses = array('Payment’); function xyz(){ $this-paginate = array(

redirect trouble

2011-03-05 Thread micah smith
Hello, Im having trouble using redirect. My $id variable isnt being passed. I've literally been using cakephp for a week and have read the redirect documentation a dozen times and cant figure the problem out. So please be kind. I was using slugs, but removed them to first understand the problem.

Help with a naive delete problem

2011-03-05 Thread jbmere
Hello I'm just a beginner with CakePHP and I just made a model, a controller and I try to figure out the functionality. (see below the model and the controller) The problem I have is that when I push the button for delete a record the system ask if I like to delete the record #3. I say yes and

what can use instead of joins in cakephp

2011-03-05 Thread vineet verma
Please tell me what can we use instead of joins in cake php? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this

How to create a web based API for video conference

2011-03-05 Thread soumyakoo...@gmail.com
Hello, I want develope a new API for video conference in my site. I don't have any idea about this. Please guied me to do his projecct. I want to know the following 1. php is suitable language for this? 2. If yes what are the other requirements. 3. what will be the initial stage for this?

Firing queries in cakephp

2011-03-05 Thread jairishab
Hi I want to fire an update query in the controller. But while I'm trying to do this, cakephp is firing an insert query instead. What to do? Rishab Sent from BlackBerry® on Airtel -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP

Help in inserting a data from one model to another

2011-03-05 Thread jaaam
i have a tempreport table and a report table. what i have to do is to validate first the tempreport. so upon clicking the validate button, the data for the chosen tempreport to be validated will be inserted into the report table. now, i can already create a new report from the tempreport

HABTM problem for help

2011-03-05 Thread Ekin Han
Hi all, I have such a problem about HABTM. I have 3 tables, users table, bugs table and bugs_users table. The relation ship between users and bugs are just like below: users HABTM bugs bugs HABTM users Now I write a method in Bugs controller which name add() just like below function add(){

Validation within the controller

2011-03-05 Thread Layek
I have done all the validation in model. I have use var $validate = array( 'ContactName' = array('length' = array('rule' = array('between', 3, 10),'message' = 'First Name cannot be blank or less than 3 characters.')), 'ContactEmail' = array('email' = array('rule' =

Re: Validation within the controller

2011-03-05 Thread Tilen Majerle
http://book.cakephp.org/view/1182/Validating-Data-from-the-Controller -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/3/5 Layek sandipla...@gmail.com I have done all the validation in model. I have use var $validate = array( 'ContactName' = array('length' = array('rule' =

Re: Help in inserting a data from one model to another

2011-03-05 Thread Stephen
Hi Jaaam I'm not sure why you've decided to do your validation this way - I would use sessions and only insert validated data if required. Why are you using a temp table? On 5 March 2011 05:44, jaaam jamile.ayla.alima...@gmail.com wrote: i have a tempreport table and a report table. what i

Re: HABTM problem for help

2011-03-05 Thread Stephen
Hi There From the cookbook: *With HABTM, you need to set the ID of the associated model in your data array. We'll build a form that creates a new tag and associates it on the fly with some recipe.* [1] Try doing User.id not User.username [1]

Re: redirect trouble

2011-03-05 Thread Sam Bernard
It's not working because in the value of $id is null when submitting your form data- it is being stored in $this-data['ModelName']['id']. Use that for the redirect. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site

Re: Firing queries in cakephp

2011-03-05 Thread Sam Bernard
Is the id of the associated row included in your data? If not, it will do an insert and not an update. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP

Re: Help with a naive delete problem

2011-03-05 Thread Sam Bernard
Use: $this-Seccion-*delete*($id) I'm pretty sure Model::del is deprecated. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To

Re: redirect trouble

2011-03-05 Thread euromark
in cake2.0 my ticket has now been implemented fixing your problem :) until then you might want to use the workaround I mentioned: http://cakephp.lighthouseapp.com/projects/42648/tickets/1418-form-should-always-post-to-itself-as-default On 5 Mrz., 15:11, Sam Bernard sambern...@gmail.com wrote:

cakedc search plugin -

2011-03-05 Thread martin
this question belongs tu the cakedc search plugin: i want to populate a query method search field dropdown with the last selected value, when a search query is fired and the form and list shows again. regards from spain martin -- Our newest site for the community: CakePHP Video Tutorials

Re: cakedc search plugin -

2011-03-05 Thread martin
resolved! i forgot to place the field in the $presetVars array array('field' = 'mes', 'type' = 'value'), now it works perfect. On 5 Mrz., 18:28, martin mschenk@gmail.com wrote: this question belongs tu the cakedc search plugin: i want to populate a query method search field dropdown

Re: Firing queries in cakephp

2011-03-05 Thread thatsgreat2345
$this-Model-id = someId; $this-Model-save(dataArray); On Mar 5, 6:13 am, Sam Bernard sambern...@gmail.com wrote: Is the id of the associated row included in your data? If not, it will do an insert and not an update. -- Our newest site for the community: CakePHP Video Tutorials

cakedc search plugin - two queriy types in $filterArgs

2011-03-05 Thread martin
cakedc is a great plugin. i need two query types in $filterArgs -code- public $filterArgs = array( array('name' = 'name', 'type' = 'like'), array('name' = 'jahr', 'type' = 'query', 'method' = 'zeitSpanneJahr'),

Re: cakedc search plugin - two queriy types in $filterArgs

2011-03-05 Thread martin
i solved it up to now with one query, where i put everything inside what i need. but it's not a perfect solution, but it works. On 5 Mrz., 19:13, martin mschenk@gmail.com wrote: cakedc is a great plugin. i need two query types in $filterArgs -code-

Re: How to create a web based API for video conference

2011-03-05 Thread Ryan Schmidt
On Mar 4, 2011, at 03:37, soumyakoo...@gmail.com wrote: Hello, I want develope a new API for video conference in my site. I don't have any idea about this. Please guied me to do his projecct. I want to know the following 1. php is suitable language for this? 2. If yes what are

Re: image upload via iphone app

2011-03-05 Thread Foroct
The only thing keeping me from using MediaPlugin in my app_photo() function is that I don't know how (that's what I'm trying to find out). I could return the image.id or the file name as an echo or a JSON response, it is being propegated through the submission stages currently. So, how would I

Re: Help with a naive delete problem

2011-03-05 Thread jbmere
Hello First of all, thanks for giving the idea but, if you see the controller, the error comes when the code fired was: if ($this-Seccion-del($id)) { And this, in fact, your suggestion. The point is that, in this point $id is loaded with 3 which is the id of the id of the record to be

Re: Help with a naive delete problem

2011-03-05 Thread Sam Bernard
Exactly. del is a deprecated function, so replace if ($this-Seccion-*del*($id)) { with if ($this-Seccion-*delete*($id)) { When a model function doesn't exist- cake tries to use it as sql, which is why del showed up as your sql query. -- Our newest site for the community: CakePHP Video

Re: Help with a naive delete problem

2011-03-05 Thread Ryan Schmidt
On Mar 5, 2011, at 23:31, Sam Bernard wrote: When a model function doesn't exist- cake tries to use it as sql, which is why del showed up as your sql query. As a still relative CakePHP newcomer, that sounds a strange thing to have built into the library; in what situations is that useful?