Get value no ID from query

2009-04-04 Thread Dave Maharaj :: WidePixels.com
How can I get the value of a field in a query result rather than the ID? I debug the variable : [User] => Array ( [id] => 3 [group_id] => 3 [username] => dave [rank] => 1 ) where rank => 1 i need the value of 1 which is Average |

Re: AuthComponent and AJAX Requests to another Controller

2009-04-04 Thread Miles J
Heres an example of my js and action. Btw im using jquery. // Js function deleteAvatar(user_id) { $.ajax({ type: "POST", url: "/ajax/deleteAvatar/", data: "data[user_id]="+ user_id, success: function (respon

Re: AuthComponent and AJAX Requests to another Controller

2009-04-04 Thread Aurelius
@ Miles J: How does your AJAX Request look like, did you do any adjustments till it worked? @captain_geek: I don't use ACL! @Brendon Kozlowski: Thats seems to be a big security-issue, cause my app admin panel should be completly with ajax thx Aurelius On 4 Apr., 20:54, Brendon Kozlowski w

Re: Offline version of the CakePHP manual.

2009-04-04 Thread Mike Cook
Hi psykro, I'm not sure if something like what I created would be of interest to anyone but Back in January I created a version for myself so I could read it on my SonyReader. It is in the EPUB format so you will need a reader than can view these files such as Adobe Digital Editions. This wa

Re: AuthComponent and AJAX Requests to another Controller

2009-04-04 Thread Brendon Kozlowski
I haven't tried this out yet, but I will soon have to be implementing something like this. I don't know for certain if the Session information is being sent along with the AJAX request - and if it's not, we need to make an exception in the controller for Auth to behave. Using the RequestHandler'

Re: Tagging system in Cake - hasAndBelongsToMany problems

2009-04-04 Thread brian
Have a look at this tip: http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-in-model-find On Sat, Apr 4, 2009 at 6:07 AM, Ben Coleman wrote: > > Hi, > > I've been using Cake for some time, but recently hit a problem with > hasAndBelongsToMany. > I have a videogame database, I'

Re: AuthComponent and AJAX Requests to another Controller

2009-04-04 Thread captain_geek
You might want to check your aros_acos table to make sure the Group/ User has rights to the controller action ... otherwise the Auth component will throw you at the login screen ... step 1: select * from acos where parent_id=(select id from acos where alias='Blogs'); step 2: find the id of the ro

Re: How to work with Auth->password()

2009-04-04 Thread brian
It depends on what hashing algo is being used. If it's SHA1 (default) it should be CHAR(40), if MD5, CHAR(32), etc. On Sat, Apr 4, 2009 at 5:50 AM, Miles J wrote: > > Your password column in your database table probably isnt long enough. > Set it to varchar 200. > > > --~--~-~--~~--

Re: Update query

2009-04-04 Thread brian
That query is emitted from Model::exists() which is called from save(). On Sat, Apr 4, 2009 at 5:08 AM, Manisha wrote: > > Hello All, > > I am using UUID as a primary key in user table i.e user_id field > >    $this->User->save($this->data); >    $this->User->id; //recently inserted user_id > >

Re: Tagging system in Cake - hasAndBelongsToMany problems

2009-04-04 Thread Teh Treag
Ben, Here is an example from the book - http://book.cakephp.org/en/view/83/hasAndBelongsToMany-HABTM -teh $this->Recipe->bindModel(array( 'hasOne' => array( 'RecipesTag', 'FilterTag' => array( 'className' => 'Tag',

undefined property 'respondAs' of RequestHandler

2009-04-04 Thread Primeminister
I try to make a custom error message and output it as a xml view. I call in the controller cakeError() : {{{ function beforeRender() { $this->cakeError('myError', $this->viewVars); } }}} and in my app_error.php I created a myError() method {{{ public function myError($params) {

Re: Cakephp -> ExtJS or YUI!

2009-04-04 Thread Sam Sherlock
see http://groups.google.com/group/cake-php/browse_thread/thread/bbfff55500ae5070 you can load javascript from vendors too and cakephp threads on the extjs forums http://www.google.com/cse?cx=001733999371871106761%3Ajgc8jk2xgwe&ie=UTF-8&q=cakephp&sa=Search - S 2009/4/4 baur79 > > Hi everyon

Controller default method

2009-04-04 Thread Toby
A fairly simple question I'm sure, but I can't seem to find it anywhere online... Is there a name you can give an action in a controller that will make it act as a catch-all actions for any undefined actions for that controller? I have found a way around this by defining the defaults in the rout

Re: Sending emails in console scripts

2009-04-04 Thread stain
foreach expects array or object as a first argument, so you might want to initialize bcc as an empty array to avoid this warning On Apr 3, 2:43 pm, "Liebermann, Anja Carolin" wrote: > Note to self: All that lines are not necessary. What works is: > > class ErinnerungShell extends Shell { >    

Re: AuthComponent and AJAX Requests to another Controller

2009-04-04 Thread Aurelius
No, that does the RequesHandler with ther Parse Extention .json That can't be the Problem, after a second login in the other Controller the Content is delivered right! thx Aurelius On 4 Apr., 03:47, Alfredo Quiroga-Villamil wrote: > How are you defining you layout for the methods? > > Do you ha

Re: Offline version of the CakePHP manual.

2009-04-04 Thread psykro
Thanks for the link, I am aware of the one page version. I was thinking more along the lines of being able to download a working version of the online manual, including things like the search functionality (either the source code + database or in CHM format) I pretty sure there was a chm for the

Tagging system in Cake - hasAndBelongsToMany problems

2009-04-04 Thread Ben Coleman
Hi, I've been using Cake for some time, but recently hit a problem with hasAndBelongsToMany. I have a videogame database, I'm trying to add a tagging system to it. I'm storing my tags in 3NF. So I have a model for games which is binding Games to Tags with hasAndBelongsToMany and also my Tag mode

Re: How to work with Auth->password()

2009-04-04 Thread Miles J
Your password column in your database table probably isnt long enough. Set it to varchar 200. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups

Update query

2009-04-04 Thread Manisha
Hello All, I am using UUID as a primary key in user table i.e user_id field $this->User->save($this->data); $this->User->id; //recently inserted user_id $values = array('user_type'=>"del" , 'date_of_registration'=>date ('Y-m-d H:i:s')); $this->User->save($values); //updating rec

Re: Add to result array in controller

2009-04-04 Thread rossjha
I'm using improvement['status'] e.g. Pending, Declined, Approved to display on screen for the user. I use the same value for the for a css class class="pending" On Apr 2, 4:11 pm, Jimmy Bourassa wrote: > Of course, it works. But that's not very MVC like in my opinion, the > color of the statu

Re: Offline version of the CakePHP manual.

2009-04-04 Thread Dinh Ba Thanh
I answered this sometimes ago: You may want to download this link to your harddisk: http://book.cakephp.org/complete/3 Best Regards, Dinh Ba Thanh, Jason bath...@gmail.com On Apr 4, 2009, at 1:12 PM, psykro wrote: > > I would like to find out > > a) if there is an offline version of the Ca

Offline version of the CakePHP manual.

2009-04-04 Thread psykro
I would like to find out a) if there is an offline version of the CakePHP manual one can download? b) if there isn't one, is one planned? c) if it isn't planned, could I offer my services in setting up and maintaining something like this? Living and developing in CakePHP in a country where bandw

Cakephp -> ExtJS or YUI!

2009-04-04 Thread baur79
Hi everyone, is there any of you have experience to implement this libraries into your Cakephp projects. we want to implement advanced feather of girds of those libraries. please light on us. Best regards Baurzhan Kazakhstan / megahosting.kz --~--~-~--~~~---~--~

Re: beginning Ajax with cakephp 1.2

2009-04-04 Thread Krish
Hi Jim, Thanks for your quick reply. let me go through the links On Apr 3, 2:33 pm, Jimmy Bourassa wrote: > Krish, > I have not used it really myself so far, but since you asked for > starting points I might as well feed you with some links. > > Teknoid wrote some a couple articles on usi

How to work with Auth->password()

2009-04-04 Thread carlito
I am using authentication components in my project. According to Apress cake book i was able to make some action hidden from all user. But while i gave password as a input, it doesn't take it and shows that password is too long to be inserted into the password field. That book also gave some inst

Re: 400 Bad Request when URL contains %

2009-04-04 Thread rich...@home
It's getting passed by a form search form submission as a GET request. On Apr 4, 12:12 am, Miles J wrote: > Why is the % there in the first place? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To

Re: Captcha reload problem, works in ff not in IE

2009-04-04 Thread Miles J
Use recaptcha.com? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@go

Re: Captcha reload problem, works in ff not in IE

2009-04-04 Thread iraj23
Please someone help me -- View this message in context: http://www.nabble.com/Captcha-reload-problem%2C-works-in-ff-not-in-IE-tp17855131p22880683.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message bec