increment a numeric field

2006-07-07 Thread bracchetto
how can i increment a numeric field? i tried to set $data['mytable']['mynumericfield'] = mynumericfield +.$params['data']['num']; and then save.. but this doesn't work. any idea? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: question about the design of table's structure

2006-07-07 Thread [EMAIL PROTECTED]
My english is not good. Thanks for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send

Re: limiting what fields can be saved

2006-07-07 Thread Samuel DeVore
I belive that model::save takes a third parameter of fields to savehttp://api.cakephp.org/class_model.html#ef348bd6a62f8196fe42b2cebafc945f Sam DOn 7/6/06, Felix Geisendörfer [EMAIL PROTECTED] wrote: Hey Chris, I think you've got a good point there. One solution I could think of is to

Re: Admin Routing - The Definitive Guide?

2006-07-07 Thread [EMAIL PROTECTED]
Hey Sam, Thanks for your post. I'm new to this group and very very new to Cake so thanks for helping me out. Ryno --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email

Re: limiting what fields can be saved

2006-07-07 Thread Felix Geisendörfer
Ahh you are right, it does take such a parameter. Hmm I'm beginning to wonder why I've got this great CakeSheet laying next to me if I don't actually look at it : p. -- http://www.thinkingphp.org http://www.fg-webdesign.de Samuel DeVore schrieb: I belive that

Re: saving data

2006-07-07 Thread Anton Bobrov
You should provide record id. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL

$html.php function url()

2006-07-07 Thread bibek
The problem is $this-base gives the whole relative path instead of the first path say i type www.abcd.com then the links returned will be linke www.abcd.com/index.php/categories/add www.abcd.com/index.php/categories/edit www.abcd.com/index.php/items/add ... which are fine but say i click on

Re: Help me!!!

2006-07-07 Thread kiterminal
Your solution is work. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL

finding webroot in controller

2006-07-07 Thread rinda
Hi, This is my cakephp application url: http://localhost:2999/php/uhicake/controller/action In my controller, what variable give me this url: http://localhost:2999/php/uhicake/ ? WWW_ROOT give me: http://localhost:2999/var/www/php/uhicake/app/webroot/ ROOT give me:

Re: cool editors for using with cakephp

2006-07-07 Thread icelander
I use TextMate on OS X, though if the file and text navigation on Easy Eclipse are the same or better, I might switch to that. The only thing I don't like about TextMate is that it doesn't do code completion. --~--~-~--~~~---~--~~ You received this message

Re: Associations between models

2006-07-07 Thread emiliano
I think that in your situation you have to set up your association as follow: waypoint_types hasMany waypoints waypoint belongsTo waypoints_types With this any waypoint will have just one type and every time could have many waypoints. Is this what you are looking? hope that helps! cheers eemi

Re: Definitive (data) pagination

2006-07-07 Thread AD7six
Hi .. The problem is easy to diagnose, but I don't know how to solve it. This code: return $this-Ajax-link( $title, $url, array( update =

Re: Is there anyone who integrate CakePHP with Prado?

2006-07-07 Thread Jonathan Snook
nate wrote: Not only does this lend itself to the unreadable, non-standards-compliant coding horrors of other such editors (ahem, Dreamweaver), but it also insulates the developer from the hard realities of implementation which are specific to web development. It I definitely take

Re: Is there anyone who integrate CakePHP with Prado?

2006-07-07 Thread Mika
Also you could do MVC in .NET if you wanted to. Go check out the Castle.Net project's MonoRail (http://www.castleproject.org/index.php/MonoRail) for something similar to ruby-on-rails and cakephp. The fact that .NET out of the box works with a front-controller pattern can't be held against it.

Re: finding webroot in controller

2006-07-07 Thread francky06l
Have a look here : http://groups.google.com/group/cake-php/browse_thread/thread/f801a4622c7395f1?hl=en --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: limiting what fields can be saved

2006-07-07 Thread [EMAIL PROTECTED]
While, I feel a little less sheepish for not having noticed that if these guys didn't either. I'm going to have to print out the api for my bedtime reading :-) I'm still not sure I like that solution best... when my user model contains 40-some fields, I'd rather not be passing arrays of that

Re: limiting what fields can be saved

2006-07-07 Thread Samuel DeVore
in your model file you could create your own save function that has a default $whitelist that then gets passed to the parent::save()Sam DOn 7/7/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: While, I feel a little less sheepish for not having noticed that ifthese guys didn't either. I'm going to

Bug in $html-dateTimeOptionTag

2006-07-07 Thread Spinnal
I think that exists a bug in the funcion $html-dateTimeOptionTag(), when I try to show a combo box usign this funtion and passing the value that I want to be selected by the function I always obtain a combo box without the date value that I pass to the funcion selected. I think that the error

Re: limiting what fields can be saved

2006-07-07 Thread nate
I suppose we could add an option to treat the whitelist as a blacklist, but anything beyond that and we're getting ahead of ourselves. Handling security at this level is very application-specific. --~--~-~--~~~---~--~~ You received this message because you are

Re: Bug in $html-dateTimeOptionTag

2006-07-07 Thread Samuel DeVore
there is a ticket with a patches at https://trac.cakephp.org/ticket/927On 7/7/06, Spinnal [EMAIL PROTECTED] wrote:I think that exists a bug in the funcion $html-dateTimeOptionTag(), when I try to show a combo box usign this funtion and passing the valuethat I want to be selected by the function I

Clarification on ACL

2006-07-07 Thread LetUsPrey
I've finally gotten a basic auth system set up using ACL. That has helped me understand the thing a lot better, but there's still one part I'm a bit fuzzy on when it comes to groups. I want to have groups (say A, B, C, D) where a user can be a member of one, all, or any combination of them.

Re: Clarification on ACL

2006-07-07 Thread Ryan Petrain
Hi,I would get the ACM plugin and use it to set up the initial set up that you want and then look at the database so you can see the relations that are made.That might get you a better understanding of what is going on. On 7/7/06, LetUsPrey [EMAIL PROTECTED] wrote: I've finally gotten a basic auth

Re: Bug in $html-dateTimeOptionTag

2006-07-07 Thread Spinnal
Thanks for the link Samuel, there are a lot of users in the CakePHP-es group with the $html-dateTimeOptionTag() problem I'll share the patch link with them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP

Re: Clarification on ACL

2006-07-07 Thread LetUsPrey
Yes, that is what I used for the initial setup, however, it does not handle the multiple groups in the way I'm looking for without doing the nested approach I mentioned above. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: get error messages

2006-07-07 Thread rpetrain
It is returning false. Once we have determined that then how do go about getting the error message so we know what went wrong? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group,

Re: Updating multiple DIVs with Ajax (choosing on the server)

2006-07-07 Thread nate
Yes and no. You can render all the div's you want, but they'll only be sent to the client if they're included in the header that provides the id's of the elements to be updated. The only other thing you could do is emulate Cake's built-in mechanism for updating multiple div's, and output

Clarification on update/delete of HABTM models..

2006-07-07 Thread pz
Hi everyone, I am trying out the blog example in the CakePHP manual. I got the easy stuff working. Great! However, I run into problems when I try to update/detele HABTM models. For example: What's the model name for the table posts_tags? I try PostTag, no good. The example shows how to

modify controller to have access to last error

2006-07-07 Thread rpetrain
Has anyone modified app_controller.php to have access to the database connection object so you have access to the previousError? If so can you put a snippet in here showing how you did it? I have been trying but I am not quite there. I have access to the object but apparently I am not using the

Re: Sanitize

2006-07-07 Thread Luke
is uses() a function or something? I don't understand the syntax --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from

How to detect which model/controller are currently being used

2006-07-07 Thread Luke
I am setting up a menu in my layout that needs to detect which model/controller are currently being used... how would I detect this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this

Re: Sanitize

2006-07-07 Thread nate
uses( ) is a Cake-specific wrapper for require_once, that loads a library in the core. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com

Call For CakePHP Database Driver Maintainers

2006-07-07 Thread nate
In an effort to support as many different databases as possible, we of the CakePHP development team are putting together a team-within-a-team of Database Driver Maintainers. Currently, Cake fully supports 6 databases, with support on the way for at least 4 additional databases. Additionally,

Really simple linked image: (Manual is malfunctional right now)

2006-07-07 Thread Luke
How would you make an image a link with the html helper tag? I tried $this-html-link($this-html-image(css/images/first_arrow.gif, htmlentities(' ')), $page_name . '/1') But it just displays the source code instead of the image... --~--~-~--~~~---~--~~ You

Re: Really simple linked image: (Manual is malfunctional right now)

2006-07-07 Thread John David Anderson (_psychic_)
On Jul 7, 2006, at 3:53 PM, Luke wrote: But it just displays the source code instead of the image... $html-link() has a parameter called $escapeTitle you need to set to false. Be sure to check it out in the API. -- J --~--~-~--~~~---~--~~ You received this

Re: include arbitrary content file

2006-07-07 Thread I. E. Smith-Heisters
Okay, I've got (what I think is ) a *better* solution (I'm quite proud of this, because I'm a n00b). I have a controller called resources_controller.php that was using renderElement() to grab the static HTML. 1) I created a directory for the archive files, call it /app/views/resources/files 2)

Re: limiting what fields can be saved

2006-07-07 Thread brandags
Would the Security component be a solution to this problem? http://manual.cakephp.org/chapter/18 With it, I believe you can ensure that people can't post data to your controller from another server - so they'd have to somehow change the html form on your own server for it to validate. I've never

Re: Really simple linked image: (Manual is malfunctional right now)

2006-07-07 Thread Luke
I apologize for posting before looking in the API... i discovered that parameter about 10 seconds after I posted this question. ::blushes:: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post

Re: limiting what fields can be saved

2006-07-07 Thread nate
Would the Security component be a solution to this problem? Kind of, but not really. The Security components handles access requests at the HTTP level, and while it can detect and deflect POST requests that don't come from within the application, it is still possible inject form elements or

Re: How to detect which model/controller are currently being used

2006-07-07 Thread Spinnal
I think you can try $this-name ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL

Re: How to detect which model/controller are currently being used

2006-07-07 Thread Myles Eftos
or $this-params['controller'] you can also find the action by $this-params['action'] On 7/8/06, Spinnal [EMAIL PROTECTED] wrote: I think you can try $this-name ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: How to detect which model/controller are currently being used

2006-07-07 Thread nate
Or $this-action. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For

update table

2006-07-07 Thread Warren Chua
hi, how do you do this in cake php?UPDATE tablename SET field='$value' WHERE id = '$id'i normally use the $this-Controller-saveField('fieldname',$value);but all i get is creating a new record. is there a way? -- regards,wa --~--~-~--~~~---~--~~ You received this

Re: update table

2006-07-07 Thread Matt
To update a table record simply use the model's save routine and make sure what you are saving has its id value set for example $this-data['Post']['id'] = $post_id; $this-Post-save($this-data); If the controller has an id argument - eg function update($id) - you don't have to worry about

Re: Extending SessionComponent

2006-07-07 Thread Matt
If I create my own session handler, turn it into a component and it in its startup function set it as the default handler using session_set_save_handler will this clash with the core SessionComponent? Creating my own handler / component seems the best way to achieve the functionality I want.