how to use authentication in rest json apis

2016-01-07 Thread Amit Gora
I am using cakephp default restfull apis and created a new controller with default app of cakephp but as for now i have removed auth and without outh apis are working fine but for security purpose i have to add authentication and i have a user login part also so please can anyone help me to add

How to unset field value of a post edit view

2015-12-22 Thread Amit Gora
i am using checkbox array in my form and save their values "," separated in database. so when i go into edit view of this post then it`s get default value of field which is set by controller so i want to disable it for some fields. how i can do it?? -- Like Us on FaceBook https://www.facebook.

Notice (8): Undefined variable: color [APP/Template\Pages\myshow.ctp, line 2]

2015-04-02 Thread Amit G
Hi, I am using CakePHP3.0 getting *Notice* (8): Undefined variable: color [*APP/Template\Pages\myshow.ctp*, line *2*] how can fix this error? Here is my full code: redirect('/'); } $page = $subpage = null; if (!empty($path[0])) { $page = $path[0];

Re: Deleting associated records

2013-01-12 Thread amit . sukapure89
Oh Yes !! Thanks a lot. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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 unsub

Re: Delete related data

2013-01-11 Thread amit . sukapure89
Thanks for reply but still won't work. Question model: > > public $hasMany = array( > 'Option' => array( > ... > 'dependent' => true > ) > ); > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/C

Deleting associated records

2013-01-11 Thread amit . sukapure89
Hello Everyone, I need to delete associated records. I have tried but can't figure it out. Here is my situation, Database, questions {id(pk), question, answer} options {id(pk), question_id, option_value} Models, Question .. public $hasMany = array( 'Option' => array('dependant' => true

Re: DetailsViewHelper (sort of)

2012-09-19 Thread Amit
Not entirely sure what you're looking for here. Regarding a simple way to to output data from the model, it seems simple enough to do: Field: If you're looking for how FormHelper->label() formats the field name, you could reimplement the label function - http://api20.cakephp.org/view_source/f

Re: How to effectively use CakePHP Models that don't use tables?

2012-08-20 Thread Amit
Thanks for correcting - I'm operating at 50% on Mondays. On Monday, August 20, 2012 11:43:55 AM UTC-5, Chetan Patel wrote: > > Hello friends, > > you can use below ideas, > > App::import('Model', 'Route'); > > $route1 = new Route(); > $route2 = new Route(); > > > -- > Thanks & Regards > > Chetan

Re: How to effectively use CakePHP Models that don't use tables?

2012-08-20 Thread Amit
try $route1 = App::import('Model', 'Route'); $route2 = App::import('Model', 'Route'); $route1->id = 2; $route2->id = 1; On Monday, August 20, 2012 5:23:36 AM UTC-5, WayneW wrote: > > Beginner here. I have a model class called "Route" and I've been > struggling to find documentation / tutorials

Re: Design reusable CakePHP application

2012-07-30 Thread Amit
Is there any good tutorial on how to do authentication via REST? Ideally implementing Oauth 2.0. On Monday, July 30, 2012 8:02:57 AM UTC-5, Dr. Tarique Sani wrote: > > You can use whatever you want even javascript :-) > > T > > On Mon, Jul 30, 2012 at 6:09 PM, Mariano C. <> wrote: > > And so I

Re: paypal on cakephp 2.x?

2012-06-06 Thread Amit
I actually tried using the CakePHP 2.0 PayPal plugin yesterday but still found it broken. I was working on updating it, but I want to check out Quixotix class first. On Wednesday, June 6, 2012 4:54:45 AM UTC-7, thqloz wrote: > > Good Afternoon, > > I was looking for something similar and I foun

Re: How do you set the physical (pixel) width of an input field?

2012-05-15 Thread Amit
Recommend you use CSS for this. Attach a class to the input code: echo $this->Form->input('username', array('class'=>'username')); css: input.username { width: 120px; } On Tuesday, May 15, 2012 7:31:02 AM UTC-5, Daniel wrote: > > How do you set the physical (pixel) width of an input field? > Fo

Part time code maintaining

2011-09-08 Thread Amit
Hey guys - I've written a simple application for a non-profit organization. I won't be able to fully support and maintain the code and looking to find a service provider to take it over. Are there companies that do that type of stuff? Any recommendations -- Our newest site for the community: Cake

Re: implementing a custom cache for views

2011-05-18 Thread Amit Badkas
Hi, I wrote http://www.sanisoft.com/blog/2010/06/21/cakephp-cache-views-by-domain-a-cache-helper/a while back, may help you. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, May 18, 2011 at 2:56 PM, Lorenzo Bettini wrote: > Hi > > I'm still struggling

Re: Problems with Auth->userScope

2011-02-10 Thread Amit Badkas
Hi, I think you are talking about ACL, not authentication. $this->Auth->userScope used as condition while doing login and it doesn't provide mechanism to access or deny particular user to particular page. Hope that helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisof

Re: array_key_exists php statement

2011-02-07 Thread Amit Badkas
Hi, Off topic, for performance improvement, use isset() instead of array_key_exists() Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Mon, Feb 7, 2011 at 12:52 PM, chris...@yahoo.com wrote: > Ok, > I manage to do that... > here is what works > >

Re: Logging of PHP fatal errors not working

2011-02-03 Thread Amit Badkas
Hi, You can log all the errors including fatal ones by using 'error_log' setting in php.ini, for example, my php.ini has log_errors = On error_log = /home/amit/Web/demos/php/logs/php_errors.log Then if there is any fatal error, I get an entry in php_errors.log like [04-Feb-2011 10:

Re: Logging of PHP fatal errors not working

2011-02-03 Thread Amit Badkas
Hi, Think again :) How can fatal error be logged when PHP is dead? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Feb 3, 2011 at 2:52 PM, bbf wrote: > Cake 1.3.7 > > core.php: > Configure::write('debug', 0); > Configure::write('log&#x

Re: Views with Joined Models

2011-01-31 Thread Amit Badkas
r's posts using foreach ($author['Post'] as $post) then $post['Tag'] will contain the list of tags assigned to that particular post. Hope that helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Tue, Feb 1, 2011 at 3:49 AM, Hill180 wrote: >

Re: Sorting by a (second level) associated model using paginate helper

2011-01-31 Thread Amit Badkas
Hi, As per the code at http://api13.cakephp.org/view_source/controller/#l-1060and http://api13.cakephp.org/view_source/controller/#l-1128 , I don't think paginate() can sort using the field of model which has more than one level deep relation with the paginated model. Amit Badkas

Re: need help

2011-01-31 Thread Amit Badkas
Hi, By setting 'empty' to false won't display the empty option but you need to set an extra option having label as 'select state', right? For this, set 'empty' => 'select state' instead of false in the 4th argument of select(). Hope that helps

Re: save multiple related records

2011-01-27 Thread Amit Badkas
Hi, Both the fields in the form are multi-select, so how you want to save the data? Will all selected users relate to all selected exercises? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Jan 28, 2011 at 4:07 AM, cake bake wrote: > is there any way to s

Re: How to know that user login failed due to wrong information?

2011-01-25 Thread Amit Badkas
Hi, Have you outputted the authentication flash message (mostly in layout) using following code? echo $session->flash('auth'); You can also set your own error message when login fails, please have a look at http://book.cakephp.org/view/1272/loginError Hope this helps. Ami

Re: Model function for Controller :: how do I call it in the Controller?

2011-01-23 Thread Amit Badkas
Hi, I already knew what you need and I can provide you the code but I think you should refer http://book.cakephp.org/view/1231/Pagination and learn by yourself how to use conditions, limit, order etc. for pagination. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Jan

Re: Model query for controller to view results

2011-01-21 Thread Amit Badkas
Hi, I think you need to set parameters for pagination, please have a look at http://book.cakephp.org/view/1232/Controller-Setup Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Jan 21, 2011 at 2:36 PM, OldWest wrote: > Ok. Can you recommend a pro

Re: Model query for controller to view results

2011-01-21 Thread Amit Badkas
Hi, You are fetching active records in $active variable but that variable is not being used anywhere. That's why the paginated results are not affected. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Jan 21, 2011 at 2:27 PM, OldWest wrote: > Ok the error

Re: Model query for controller to view results

2011-01-21 Thread Amit Badkas
' => 1) // Gets all active=1 plan_details. ); return $this->find('all', $findParameters); } Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Jan 21, 2011 at 2:04 PM, OldWest wrote: > I am contin

Re: Database-Design for making a Comment a parent of another Comment

2011-01-20 Thread Amit Badkas
Hi, I think you need to try Tree behavior, please have a look at http://book.cakephp.org/view/1339/Tree Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Jan 20, 2011 at 1:14 PM, josef corley wrote: > Howdy. ^^ > > I'm a noob at this s

Re: image upload issue

2011-01-20 Thread Amit Badkas
basics, then please refer http://book.cakephp.org first and try to build a basic blog application (http://book.cakephp.org/view/1528/Blog). Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Jan 20, 2011 at 1:56 PM, andy_the ultimate baker < anandghaywankar...@gmail.com> wrote: >

Re: image upload issue

2011-01-19 Thread Amit Badkas
Hi, Have you corrected field names in view (e.g., 'filedata' instead of 'Image/filedata')? Also provide 'type' as 'file' to Form->create(). For example, Form->create('Image', array('action'=>'admin_upload', 't

Re: image upload issue

2011-01-19 Thread Amit Badkas
lso the code in controller's action is $file = $this->data['Image']['images']; but it should be $file = $this->data['Image']['filedata']; as the file upload field's name is 'filedata', not 'images'. Hope this help

Re: image upload issue

2011-01-19 Thread Amit Badkas
Hi, What is the error you are facing? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Jan 20, 2011 at 11:17 AM, andy_the ultimate baker < anandghaywankar...@gmail.com> wrote: > hi there, > i working on image uploading, but i m facing an error, > can an

Re: Can't get Form->select() with *no* empty value to work in 1.3 --psybear

2011-01-19 Thread Amit Badkas
Hi, Form helper's select() method needs attributes as 4th argument and not 3rd, so following should be the correct syntax Form->select('dienstmodell', $dienstmodelle, null, array('empty' => false)); ?> Hope this helps. Amit Badkas PHP Applications for E-Biz:

Re: Problem with saveAll() not saving related model

2011-01-19 Thread Amit Badkas
p > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php > Amit Badkas PHP Applications for E-Biz: http://www.sa

Re: Best way to write into array

2011-01-19 Thread Amit Badkas
Hi, You need to use saveAll(), have a look at http://book.cakephp.org/view/1032/Saving-Related-Model-Data-hasOne-hasMany-belongsTo Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Jan 19, 2011 at 5:00 PM, Jens Dittrich wrote: > Hello! > >

Re: Problem with saveAll() not saving related model

2011-01-19 Thread Amit Badkas
[type_id] => 1 [item_id] => 1250 [old_qty] => 10 [new_qty] => 9 ) ) ) $this->Item->saveAll($item); Above will work fine. Hope this helps. A

Re: Form Validation does not work on Cake 1.3.6

2011-01-19 Thread Amit Badkas
Hi, If you are having 'call to a member of a non-object' error for $this->Form then I doubt you are using CakePHP 1.2.x and not 1.3.x Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Jan 19, 2011 at 5:38 AM, Kh3ops wrote: > Actually, I baked my appl

Re: auth component issue

2011-01-18 Thread Amit Badkas
Hi, You need to use $this->redirect($this->Auth->logout()); instead of $this->redirect(array('action'=>'login')); in users controller's logout action. Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Jan

Re: retrieve data from find result array

2011-01-18 Thread Amit Badkas
Hi, As per the $status array structure, you should use $status[0][0]['time'] Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Jan 19, 2011 at 12:24 PM, ojonam wrote: > Hi, > > I have a model Status with fields 'name',

Earn upto Rs. 9,000 pm with PaisaLive.com!

2011-01-15 Thread Amit Rawat
to earn launch referral bonus on every new registration. http://www.PaisaLive.com/register.asp?1354913-4842784<http://www.paisalive.com/register.asp?1354913-4842784> PaisaLive - Get Paid to read emails {Amit Rawat} Check out the new CakePHP Questions site http://cakeqs.org and help othe

Re: About using saveField in a custom model save function

2011-01-13 Thread Amit Badkas
Hi, I think you want to do something like following, right? function save($data = null) { $data[$this->alias]['some_field_name'] = 'some_value'; // or $data[$this->alias]['some_field_name'] = 'some_value'; return parent::save

Re: date

2011-01-13 Thread Amit Badkas
Hi, There are 3 methods for this First is to pass selected value as an array like this array( 'day' => 13, 'month' => 1, 'year' => 2011, ); Second one is to use string like 2011-01-13. And third one is use timestamp generated by mktime() or time()

Re: Not finding Cake folder

2011-01-12 Thread Amit Badkas
Hi, The error is 'Fatal error: Call to a member function html() on a non-object in /var/www/site/app/views/layouts/default.ctp on line 2', so I want to see what have you written on 2nd line of default.ctp layout because I don't think there is any helper method like html(). A

Re: tmp Folder permissions

2011-01-12 Thread Amit Badkas
Hi, The app/tmp directory should be recursively writable by the web server if PHP is installed as a module (for example, with Apache) otherwise (for example, with IIS) should be recursively writable by the user which runs PHP. Hope this helps. Amit Badkas PHP Applications for E-Biz: http

Re: Display custom View based on 3 schema's - Recommendation please

2011-01-12 Thread Amit Badkas
Hi, If you need this for only a single page then it would be fine to write the 'if' conditions to that action otherwise you can use beforeRender() callback to change view file's name to render. Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com

Re: District and city select with Ajax in cakephp 1.2

2011-01-12 Thread Amit Badkas
Hi, Have you tested in Firefox with Firebug if the AJAX request goes or not? Also try to access the AJAX page (something like http://your-domain/your-directory/cities/getcities) directly in the browser to check if it outputs what you need. Hope this helps. Amit Badkas PHP Applications for E

Re: Cakephp MVC Pattern

2011-01-12 Thread Amit Badkas
Hi, Sure, you can do that by using $this->query() in the model. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Jan 12, 2011 at 6:49 PM, Gopinath T.M wrote: > Shall we use model without association...instead of association shall > we use direct query

Re: Getting error : 500 Internal Server Error to create a subdomain with cakephp

2011-01-12 Thread Amit Badkas
AllowOverride directive)? Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Jan 12, 2011 at 5:58 PM, masud wrote: > Hello there. > I have create a subdomain on my godaddy hosting. my previeous site was > made by CakePHP now i want to make a

Re: setflash edit

2011-01-11 Thread Amit Badkas
ails view and back to the index view it gives me the message 'your job has been updated'." and now you are asking "How can I refresh the page to remove the flash message from the page?". So, I am confused about what exactly you need. Please be specific about your

Re: manipulation of fields before saving - how to get it to work for saveAll?

2011-01-11 Thread Amit Badkas
Hi, The saveAll() internally calls save(), that's why I suggested to use beforeSave(). Are you passing any option to saveAll() other than data? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Tue, Jan 11, 2011 at 5:11 PM, Zeu5 wrote: > Thank you Amit, but the sa

Re: manipulation of fields before saving - how to get it to work for saveAll?

2011-01-11 Thread Amit Badkas
Hi, I think you need to try beforeSave() instead of beforeValidate(), hope it may work. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Tue, Jan 11, 2011 at 5:02 PM, Zeu5 wrote: > let say my model Link has 3 fields > route, model, action, > > what I want is t

Re: Fatal error: Call to undefined function __l()

2011-01-11 Thread Amit Badkas
Hi, You can check in the old code, in which file does the 'function __l' string contain. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Tue, Jan 11, 2011 at 2:39 PM, osamo101 wrote: > Hi Amit, > > This is very strange, the __l() is repeated in the cod

Re: Fatal error: Call to undefined function __l()

2011-01-10 Thread Amit Badkas
Hi, I don't think there is/was any __l() function in CakePHP-1.2.x, it may be written in any file which got overwritten. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Tue, Jan 11, 2011 at 12:09 PM, osamo101 wrote: > Hello, > > I have a website written

Re: Form Validation does not work on Cake 1.3.6

2011-01-10 Thread Amit Badkas
Hi, Your description of the validation problem is too less to give any suggestion. Also about the usage of $form instead of $this->Form, you can use $form in CakePHP-1.3.x but it will be removed in future versions and that's why you have to use $this->Form. Amit Badkas PHP Applica

Re: Plugin tutorial in the book

2011-01-10 Thread Amit Badkas
Hi, http://book.cakephp.org/view/1114/Plugin-Models doesn't have what you mentioned. It uses model name as 'PizzaOrder' and not 'PizzaOrderModel'. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Tue, Jan 11, 2011 at 5:42 AM, Parris wrote: > H

Re: I am getting an error like this after i submit an action.

2011-01-10 Thread Amit Badkas
Hi, The error message itself has information for file and line number ('C:\xampp\htdocs\todo\app\models\post.php:9') you need to look at. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Mon, Jan 10, 2011 at 5:09 PM, Deepak wrote: > Warning (2): Cannot

Re: Filtering by related model...

2011-01-09 Thread Amit Badkas
Hi, Could you please show me the structure of categories table. I need to know surely if Product belongs to Category or Product has many Category or Product has and belongs to many Category. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Sat, Jan 8, 2011 at 1:25 AM, TSG

Re: setflash edit

2011-01-09 Thread Amit Badkas
Hi, Does the details page output flash message? You don't need to delete flash message in session explicitly, $this->Session->flash() does it automagically. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Sat, Jan 8, 2011 at 1:13 AM, lvdb wrote: > Hello, &

Re: Validation messages not showing up on Change Password page

2011-01-09 Thread Amit Badkas
er' => 'users', 'action' => 'view')); } else { debug($this->User->validationErrors); $this->Session->setFlash(__('Sorry, a problem occurred trying to save your account information. Please, try again.', true)); } Amit Badkas PHP Applicat

Re: Save and Update 2 or more Tables

2011-01-06 Thread Amit Badkas
Hi. I think the line if(!$this->GroupMember->save($this->$member)) should be if($this->GroupMember->save($member)) Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Jan 7, 2011 at 10:22 AM, chris...@yahoo.com wrote: > if(!$this-

Re: Logging out from Admin/ that should point to App/Users Controller

2011-01-05 Thread Amit Badkas
=> '', 'action' => ''); or if you have more than one or want a generic solution then try $this->Auth->logoutRedirect = '//'; You can use above in the views too to build URLs for the links. Hope this helps. Amit Badkas PHP Applications for E-Biz

Re: Video Points, Cost

2011-01-05 Thread Amit Badkas
Hi, The code in action uses $id but from where does it come/initialize? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Jan 6, 2011 at 1:55 AM, chris...@yahoo.com wrote: > Hi guys, > I need help with video points,... I'm creating feature that users ca

Re: Logging out from Admin/ that should point to App/Users Controller

2011-01-05 Thread Amit Badkas
the 'logoutRedirect' URL but as per the http://book.cakephp.org/view/950/Prefix-Routing, there is nothing like 'Routing.admin' configuration option. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Jan 5, 2011 at 10:52 PM, John Maxim wrote: > > http

Re: select box with fullName

2011-01-04 Thread Amit Badkas
Hi, Please have a look at http://book.cakephp.org/view/1608/Virtual-fields Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Tue, Jan 4, 2011 at 2:41 PM, Gazmend Nrecaj wrote: > Hi, > > I have a users table with columns firstName and lastName, and want in a &g

Re: find() conditions using hasMany relationship

2011-01-02 Thread Amit Badkas
Hi, Please have a look at 'Sub-queries' section of http://book.cakephp.org/view/1030/Complex-Find-Conditions (at the end of the page), hope it helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Dec 31, 2010 at 8:15 PM, aughrt wrote: > Hello! > &

Re: a small issue

2010-12-31 Thread Amit Badkas
x27;logout')),array('controller'=>'users','action'=>'logout'), *array('escape' => false)*); Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Dec 31, 2010 at 3:05 PM, poor-grammar wrote: > echo $this->

Re: How to use Grant in Shell ?

2010-12-31 Thread Amit Badkas
Hi, Try the command by replacing $aroAlias (this should be any record's value in aros table for alias field) and $acoAlias (this should be any record's value in acos table for alias field) with their proper values. Hope this helps. Amit Badkas PHP Applications for E

Re: (Acl) Error: aro not found No tree returned.

2010-12-30 Thread Amit Badkas
Hi, Add following code at the end of myAction() method, so that it won't try to render the view $this->render(false); Also look at the SQL queries if 'aros' table is populating correctly or not by setting debug level to 2. Hope this helps. Amit Badkas PHP Applicatio

Re: How to use Grant in Shell ?

2010-12-30 Thread Amit Badkas
Hi, What are the actual values of $aroAlias and $acoAlias variables? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Dec 31, 2010 at 11:47 AM, John Maxim wrote: > I have tried: > > >cake acl grant $aroAlias $acoAlias > --- > Error: Wrong number o

Re: (Acl) Error: aro not found No tree returned.

2010-12-30 Thread Amit Badkas
Hi, I meant that you need to access the method myAction() from URL so that the code in that method will get executed and according to that code, the dummy records will get populated to 'aros' table. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Dec 31, 20

Re: Add User/Group in Descending Order by Time(Last Add)

2010-12-30 Thread Amit Badkas
Hi, >From the data you posted, it seems that they are properly inserting in table as the IDs are incrementing. If you are displaying that data anywhere and you need to sort/order them in a particular way then use 'order' parameter while finding the records. Amit Badkas PHP Appli

Re: Url to action without action name

2010-12-30 Thread Amit Badkas
Hi, Please have a look at http://book.cakephp.org/view/949/Passing-parameters-to-action, hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Dec 30, 2010 at 3:15 PM, talisker wrote: > Hello! > > I need just this: go directy to an action wi

Re: Help with 'persist' on Router::Connect

2010-12-30 Thread Amit Badkas
'action' => 'index', 'lang' => 'esp' )); Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Dec 31, 2010 at 2:50 AM, talisker

Re: Cakephp related tables show id's instead of values

2010-12-30 Thread Amit Badkas
...) ) ) After this, you need to modify the 'view' to display qualification name in 'related qualificationlookups' table. Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Dec 30, 2010

Re: using onmouseup to update database

2010-12-30 Thread Amit Badkas
Hi, I think you are asking this question at a wrong place as it is more of a HTML/Javascript related than PHP/CakePHP. Have you ever done AJAX using onchange in a simple HTML/PHP application using jQuery or javascript etc.? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On

Re: (Acl) Error: aro not found No tree returned.

2010-12-30 Thread Amit Badkas
Hi, Have you executed the code in anyAction() to populate ACL tables with dummy data, something like http:// //users/anyAction? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Dec 30, 2010 at 8:39 PM, John Maxim wrote: > Hi everyone, > > While working on t

Re: query

2010-12-30 Thread Amit Badkas
Hi, Please have a look at http://book.cakephp.org/view/1030/Complex-Find-Conditions, you will get the solution definitely. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Dec 30, 2010 at 5:37 PM, Miqdad Ali wrote: > $qry="select * from enrollments where pr

Re: query

2010-12-30 Thread Amit Badkas
Hi. You don't need 'AND' key, $conditions = array( 'Enrollment.program_id'=>12, 'OR'=>array( 'Enrollment.semester_id'=>12, 'Enrollment.batch_id'=>23, ) ); is the correct one

Re: using onmouseup to update database

2010-12-29 Thread Amit Badkas
Hi, The code doesn't seem to be as per CakePHP standard. However, you need to handle onchange event of a select to save the selected option (probably using an AJAX request). Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Dec 30, 2010 at 12:58 AM, roundrightfarm

Re: Save and Loops

2010-12-29 Thread Amit Badkas
Hi, You said that first and last iterations failed to insert. Was there any errors outputted? Try to output $this->Enrollment->Appointment->validationErrors array for failed data. Please remember to test this with debug level 2 so that it will output errors (if any) as well as SQL queri

Re: Help with function Login()--using Auth (Redirecting issue)

2010-12-29 Thread Amit Badkas
Hi, By default, Auth component redirects to referrer page (if set) otherwise to the page set in loginRedirect. So you may need to overwrite 'Auth.redirect' session parameter. FYI, please have a look at http://book.cakephp.org/view/1270/loginRedirect Amit Badkas PHP Applications for E

Re: admin edit points featured videos, groups, etc...

2010-12-29 Thread Amit Rawat
;]['featured_video_points']); } $result=$this->FeaturedVideoPoint->find('list',array('fields'=>array( featured_video_points''))); $this->set('points', $result); } Enjoy Amit Check out the new CakePHP Questions si

Re: HELP NEEDED with Auth "Component" in Views; Fatal error: (While using Auth component inside a helper)

2010-12-29 Thread Amit Badkas
Hi, My question was 'are the ACL tables (aros, acos and aros_acos) populated correctly?', please refer to http://book.cakephp.org/view/1543/Simple-Acl-controlled-Application to understand how to populate ACL tables. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com O

Google adword help

2010-12-29 Thread Amit Rawat
Hi, Can anyone tell me how to get data(scrap it) from google adword keyword tool for a particular keyword? Thanks and Regards, Amit Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are

Re: HELP NEEDED with Auth "Component" in Views; Fatal error: (While using Auth component inside a helper)

2010-12-29 Thread Amit Badkas
Hi, About 'Undefined index: content' error, you should already know how to fix it. About 'DbAcl::check() - Failed ARO/ACO node lookup in permissions check' error, are the ACL tables (aros, acos and aros_acos) populated correctly? Amit Badkas PHP Applications for E-Biz: htt

Re: HELP NEEDED with Auth "Component" in Views; Fatal error: (While using Auth component inside a helper)

2010-12-29 Thread Amit Badkas
Hi, Have you had AccessComponent class defined in app/controllers/components/access.php? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Dec 29, 2010 at 1:30 PM, John Maxim wrote: > class AccessHelper extends Helper{ >var $helpers = array(&q

Re: Help with function Login()--using Auth (Redirecting issue)

2010-12-28 Thread Amit Badkas
Hi, I think the problem is due to other thing(s). I can't advise much without looking at all of the code. However, please refer http://book.cakephp.org/view/1250/Authentication to check if you have set-up authentication parameters correctly or not. Hope this helps. Amit Badkas PHP Applica

Re: Help with function Login()--using Auth (Redirecting issue)

2010-12-28 Thread Amit Badkas
; 'index')); to go to that page. Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Dec 29, 2010 at 10:28 AM, John Maxim wrote: > Users_controllers.php: > > > var $name = 'Users'; > >

Re: Help with function Register--using Auth

2010-12-28 Thread Amit Badkas
Hi, The code posted by you in second mail is the most common way to validate and save data in a single go but it doesn't mean that you can't do it using validates() and save(). As you asked in the first mail about what's wrong in the code, I pointed you to the missing 'set

Re: Help with function Register--using Auth

2010-12-28 Thread Amit Badkas
Hi, You need to set the data for the model to validate it, please refer http://book.cakephp.org/view/1182/Validating-Data-from-the-Controller Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Dec 29, 2010 at 9:36 AM, John Maxim wrote: > function regis

Re: how to use updateAll and IN clause together

2010-12-26 Thread Amit Badkas
Hi, Have you looked at the SQL queries log? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Mon, Dec 27, 2010 at 11:45 AM, Zeu5 wrote: > This is the example of the query I want to execute. > // UPDATE cart_items SET product_price = 2 WHERE product_id = 4 AND id >

Re: recursive call

2010-12-26 Thread Amit Badkas
Hi, The form helper judges the options of a select field according to the section of field name before '_id'. For example, it uses $departments if field name is 'department_id', so try to set variable name as 'parents' instead of 'parentUsers'. Hope this h

Re: Display data from specific data in the Home Page

2010-12-26 Thread Amit Badkas
Hi, Please follow http://book.cakephp.org/view/1528/Blog to build a basic blog application in CakePHP so that you will get familiar with CakePHP working. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Sun, Dec 26, 2010 at 7:38 PM, Ahmed - CakePHP wrote: > >

Re: Plugin-DataSources Sample ?

2010-12-26 Thread Amit Badkas
Hi, The guide shows you a way to build/implement datasources which you can use for your models. About the interface, it's upto you how you want it. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Sat, Dec 25, 2010 at 9:54 PM, John Maxim wrote: > Following the li

Re: how to use transactions in cakephp

2010-12-24 Thread Amit Badkas
Hi, I didn't know that you need to use saveAll() inside transaction. By default, saveAll() starts new transaction. So change your saveAll() call from $result = $this->saveAll($data); to $result = $this->saveAll($data, array('atomic' => false)); Hope this helps. Amit

Re: how to use transactions in cakephp

2010-12-23 Thread Amit Badkas
Hi, I would use something like following in one of the models to save data for non-related InnoDB tables $db =& ConnectionManager::getDataSource($this->useDbConfig); $db->begin($this); $db->commit($this); Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www

Re: does $this->render act as "die" in 1.2?

2010-12-23 Thread Amit Badkas
Hi, No, $this->render() doesn't stop execution. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Dec 23, 2010 at 3:47 PM, Stephen wrote: > Simple question. > > I'm reworking some of my code to make it more efficient and user friendly >

Re: How can I add to one table while I'm adding to another

2010-12-22 Thread Amit Badkas
nd some code in it need to change as per latest version of CakePHP'. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Dec 22, 2010 at 11:02 PM, georgeman wrote: > Thanks for the tips. I don't think SaveAll is the solution I am > looking for. > > What

Re: Default Page

2010-12-22 Thread Amit Badkas
Hi, By default CakePHP renders app/views/pages/home.ctp view for '/' URL, though you can change this by making changes in app/config/routes.php Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Dec 22, 2010 at 7:53 PM, Nicolas400 wrote:

Re: call in to variables...

2010-12-22 Thread Amit Rawat
Hi, Is your username unique? if yes then you can use this $parent_id=$this->User->field('id',array('username'=>$username)); Enjoy On Thu, Dec 23, 2010 at 6:48 AM, chris...@yahoo.com wrote: > Hi Amit, thank you for your help. But it didn't work. I may, a

  1   2   3   4   >