How to integrate big blue button on cakePHP 2.0

2014-02-10 Thread Mohit Garg
Hi,

Please help me .

I want to integrate big blue button on cakePHP 2.0.

Thanks

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Please fill this survey

2013-10-27 Thread mohit kumar
Hi,
Greetings.

The following survey is meant for educational assignment for one of my
friend.
Please spare some time and fill this survey.

*https://www.surveymonkey.com/s/QT78HXP*


Thanks for your valuable time.



*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: undefined index error

2012-08-20 Thread mohit kumar
yeah the problem got solved. I was making a basic error.

Thanks for support  :)

*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*



On Mon, Aug 20, 2012 at 10:08 AM, Bharat Maheshwari <
bharat.maheshw...@logicspice.com> wrote:

> As you use all in $current_roster = $this->Weeklyroster->find('**all',
> array('conditions' => array('Weeklyroster.week' => $id))); so it is
> creating following structure :-
>
> array(
> [0]
>  array(
>   ['Weeklyroster']
> array(
>  ['field_name1']
>  ['field_name2']
>  )
>   )
> )
>
> You have to use foreach loop to print data or if you have only one row
> from database please use first besides all
>
>
> On Monday, August 13, 2012 9:09:37 PM UTC+5:30, mohit wrote:
>>
>> Hi Folks,
>>
>> I am having a strange error. I don't know what I am doing wrong.
>> I am using following code in my weeklyrostercontroller.php file
>>
>> var $uses = array('Weeklyroster','Shift');
>>>
>>
>> I have created a function to generate the roster.
>>
>>
>> public function generate($id = null) {
>>> $this->Weeklyroster->week= $id;
>>> //if (!$this->Weeklyroster->exists(**)) {
>>> //throw new NotFoundException(__('Invalid weeklyroster'));
>>> //}
>>> //$this->set('weeklyroster', $this->Weeklyroster->read('**week',
>>> $id));
>>> $current_roster = $this->Weeklyroster->find('**all',
>>> array('conditions' => array('Weeklyroster.week' => $id)));
>>> foreach ($current_roster as $current_rosters) {
>>> $vid=$current_rosters['**Weeklyroster']['id'];
>>>
>>> $current_shifts = 
>>> $this->Weeklyroster->Shift->**find('all',array('conditions'
>>> => array('Shift.id' => $vid)));
>>>
>>>
>>> }
>>>
>>>
>>> $this->set('weeklyroster', $current_roster);
>>> $this->set('current_shifts',$**current_shifts);
>>>
>>> }
>>> }
>>
>>
>>   if a use following code ($weeklyroster['Weeklyroster']**['week'] in my
>> view file , I get the following error.
>>
>> *Notice* (8): Undefined index: Weeklyroster 
>> [*APP\View\Weeklyrosters\generate.ctp*, line *3*]
>>
>> Please suggest
>>
>>
>>
>> *With Best Regards,
>> Mohit Kumar <http://kumarmohit.com>*
>> *+91-9582894570*
>>
>>  --
> 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...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Formatting Checkbox in formhelper

2012-08-19 Thread mohit kumar
Hi Folks,

I am using the following code to display all the users in the my form.

echo $this->Form->input('User',array(
> 'label' => __('Users',true),
> 'type' => 'select',
> 'multiple' => 'checkbox',
> 'options' => $users,
> ));




> Which essentially gives me all the users from that model. What if I need
>>>> to display the users based on some criteria. Like sorting them on one
>>>> criteria,
>>>>
>>>
*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*

-- 
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...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: undefined index error

2012-08-14 Thread mohit kumar
I tried that also using a for each. still having some problems with it.

*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*



On Tue, Aug 14, 2012 at 7:39 PM, Dave M.  wrote:

> I suggest you throw a debug($weeklyroster) into your view to see how the
> array is actually structured. I would assume that you would want
> $weeklyroster[0]['Weeklyroster']**
> ['week'], $weeklyroster[1]['Weeklyroster']**['week'], etc.
>
> On Monday, August 13, 2012 11:39:37 AM UTC-4, mohit wrote:
>>
>> Hi Folks,
>>
>> I am having a strange error. I don't know what I am doing wrong.
>> I am using following code in my weeklyrostercontroller.php file
>>
>> var $uses = array('Weeklyroster','Shift');
>>>
>>
>> I have created a function to generate the roster.
>>
>>
>> public function generate($id = null) {
>>> $this->Weeklyroster->week= $id;
>>> //if (!$this->Weeklyroster->exists(**)) {
>>> //throw new NotFoundException(__('Invalid weeklyroster'));
>>> //}
>>> //$this->set('weeklyroster', $this->Weeklyroster->read('**week',
>>> $id));
>>> $current_roster = $this->Weeklyroster->find('**all',
>>> array('conditions' => array('Weeklyroster.week' => $id)));
>>> foreach ($current_roster as $current_rosters) {
>>> $vid=$current_rosters['**Weeklyroster']['id'];
>>>
>>> $current_shifts = 
>>> $this->Weeklyroster->Shift->**find('all',array('conditions'
>>> => array('Shift.id' => $vid)));
>>>
>>>
>>> }
>>>
>>>
>>> $this->set('weeklyroster', $current_roster);
>>> $this->set('current_shifts',$**current_shifts);
>>>
>>> }
>>> }
>>
>>
>>   if a use following code ($weeklyroster['Weeklyroster']**['week'] in my
>> view file , I get the following error.
>>
>> *Notice* (8): Undefined index: Weeklyroster 
>> [*APP\View\Weeklyrosters\generate.ctp*, line *3*]
>>
>> Please suggest
>>
>>
>>
>> *With Best Regards,
>> Mohit Kumar <http://kumarmohit.com>*
>> *+91-9582894570*
>>
>>  --
> 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...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




undefined index error

2012-08-13 Thread mohit kumar
Hi Folks,

I am having a strange error. I don't know what I am doing wrong.
I am using following code in my weeklyrostercontroller.php file

var $uses = array('Weeklyroster','Shift');
>

I have created a function to generate the roster.


public function generate($id = null) {
> $this->Weeklyroster->week= $id;
> //if (!$this->Weeklyroster->exists()) {
> //throw new NotFoundException(__('Invalid weeklyroster'));
> //}
> //$this->set('weeklyroster', $this->Weeklyroster->read('week',
> $id));
> $current_roster = $this->Weeklyroster->find('all',
> array('conditions' => array('Weeklyroster.week' => $id)));
> foreach ($current_roster as $current_rosters) {
> $vid=$current_rosters['Weeklyroster']['id'];
>
> $current_shifts =
> $this->Weeklyroster->Shift->find('all',array('conditions' =>
> array('Shift.id' => $vid)));
>
>
> }
>
>
> $this->set('weeklyroster', $current_roster);
> $this->set('current_shifts',$current_shifts);
>
> }
> }


  if a use following code ($weeklyroster['Weeklyroster']['week'] in my view
file , I get the following error.

*Notice* (8): Undefined index: Weeklyroster
[*APP\View\Weeklyrosters\generate.ctp*, line *3*]

Please suggest



*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*

-- 
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...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread mohit kumar
thanks Mike.. Let me try that . But the problem is my controller that i
generated by the bake is like

user -
shift -
save so with 1 form 1 can save only one user, will it be possible for me to
save multiple mappings with one go

*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*



On Fri, Aug 10, 2012 at 2:51 PM, Mike Griffin  wrote:

> On Fri, Aug 10, 2012 at 10:05 AM, mohit kumar  wrote:
> > How can i display the data in this format. [] are checkboxes
> >
> >
> > Users   Shift1 shift2 shift3 shift4
> > user1[]  [] [] []
> > user2[]  [] [] []
> > user3[]  [] [] []
> > user4[]  [] [] []
> > user5[]  [] [] []
> >
>
> Is this something like what you are looking for?
>
>
>  echo "";
> foreach($users as $u) {
>   // output the users name here, as the first cell of a table, for example
>   echo "".$u['name']."";
>   for($i=0; $i<5; $i++) {
> // output the shifts here
> echo "[CODE FOR CHECKBOX]";
>   }
>   // finish the row in the table
>   echo "";
> }
> echo "";
>
> Mike.
>
> --
> 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...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread mohit kumar
How can i display the data in this format. [] are checkboxes

   1.
   2. Users   Shift1 shift2 shift3 shift4
   3. user1[]  [] [] []
   4. user2[]  [] [] []
   5. user3[]  [] [] []
   6. user4[]  [] [] []
   7. user5[]  [] [] []



*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*



On Fri, Aug 10, 2012 at 2:30 PM, Tilen Majerle wrote:

> i'm not understanding you well, describe more about your problem..
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
>
>
>
> 2012/8/10 mohit kumar 
>
>> Any idea guys?
>>
>> *With Best Regards,
>> Mohit Kumar <http://kumarmohit.com>*
>> *+91-9582894570*
>>
>>
>>
>> On Thu, Aug 9, 2012 at 11:03 AM, mohit kumar  wrote:
>>
>>> Hi Folks,
>>>
>>> Can anyone help me regarding this.
>>>
>>> http://stackoverflow.com/questions/11864306/how-to-display-a-grid-of-checkboxes-in-cakephp-for-add-action
>>>
>>>
>>>
>>> *With Best Regards,
>>> Mohit Kumar <http://kumarmohit.com>*
>>> *+91-9582894570*
>>>
>>>
>>  --
>> 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...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>
>>
>>
>
>  --
> 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...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Need Help

2012-08-10 Thread mohit kumar
Any idea guys?

*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*



On Thu, Aug 9, 2012 at 11:03 AM, mohit kumar  wrote:

> Hi Folks,
>
> Can anyone help me regarding this.
>
> http://stackoverflow.com/questions/11864306/how-to-display-a-grid-of-checkboxes-in-cakephp-for-add-action
>
>
>
> *With Best Regards,
> Mohit Kumar <http://kumarmohit.com>*
> *+91-9582894570*
>
>

-- 
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...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Recursive Retrieval of Data.

2012-08-09 Thread mohit kumar
Is it possible to retrieve data recursively for related models.
For example,
I have a table with Roster, which has Shifts and each shift has several
users. I want to display

Roster

--Shift1
 User1
 User2

 UserN

Shift2
 User1
 User2

 UserN

and so on.

How can we do that? Thanks for help in advance,

*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*

-- 
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...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Custom queries in cake PHP

2012-08-06 Thread mohit kumar
How to use them in view template?


*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*



On Mon, Aug 6, 2012 at 10:43 PM, Vinicius Dusso  wrote:

> Hi Mohit,
>
> You can use the 'query' method:
>
> $this->YourModel->query('SELECT * FROM table');
>
> Take a look in this tutorial:
> http://book.cakephp.org/1.3/view/1027/query
>
> []'s
>
> Vinicius
>
> Em segunda-feira, 6 de agosto de 2012 13h06min53s UTC-3, mohit escreveu:
>
>> Hi Folks,
>> What is the best way to have custom queries from the database. I need to
>> query from one of the pages.
>>
>> *With Best Regards,
>> Mohit Kumar <http://kumarmohit.com>*
>> *+91-9582894570*
>>
>>  --
> 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 group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Custom queries in cake PHP

2012-08-06 Thread mohit kumar
Hi Folks,
What is the best way to have custom queries from the database. I need to
query from one of the pages.

*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: send mails

2012-08-03 Thread mohit kumar
You can use Gmail as an smtp service to send the email. Configure cake php
to work with SMTP and use gmail.

*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*



On Fri, Aug 3, 2012 at 4:25 PM, raj kumar Pustela wrote:

>
>Hi to all,
>
>I am Struggled one thing,
> how to send email in cakephp 2.0.3 from localhost(wamp).if anyone known
> dat please help me.
>
>
>
>
> Thanks,
> Rajakumar.
>
> --
> 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 group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem with adding records

2012-07-14 Thread mohit kumar
Now the problems are still same, I upgraded to the new version of cake php.
I have deleted and created the database again.
still i am getting same error.

When i try to execute the same query with mysql, it generates no error.

Here is the output of the sql dump from cake php, if executed on mysql , it
generates no error
NrQueryErrorAffectedNum. rowsTook (ms)  1INSERT INTO `competence`.`users`
(`username`, `password`, `role`, `experience`, `modified`, `created`)
VALUES ('mohit', 'mohit', 'Engineer', 1, '2012-07-15 08:48:26', '2012-07-15
08:48:26')
11151 2SELECT `UsersCertification`.`certification_id` FROM
`competence`.`users_certifications` AS `UsersCertification` WHERE
`UsersCertification`.`user_id` = 6
001 3BEGIN
001


*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*



On Fri, Jul 13, 2012 at 8:17 PM, mohit kumar  wrote:

> Cake PHP 2.2.0
>
> +---+
> | version() |
> +---+
> | 5.5.16|
> +---+
> 1 row in set (0.12 sec)
>
>
> On Fri, Jul 13, 2012 at 8:09 PM, Mike Griffin  wrote:
>
>> Where is the error message appearing?
>>
>> I've tried creating a database and creating the table and when I run the
>> INSERT query, it works fine. Can you try running that query from the
>> command line and see what happens then?
>>
>> What version of cakePHP and MySQL are you using?
>>
>>
>> On Fri, Jul 13, 2012 at 3:08 PM, mohit kumar  wrote:
>>
>>> That was I guess added by bake tool, i did not code the add function.
>>>
>>> the information that i get when i try to add is as follows
>>>
>>>
>>>
>>> NrQueryErrorAffectedNum. rowsTook (ms)  1INSERT INTO
>>> `competence`.`users` (`username`, `password`, `role`, `experience`,
>>> `modified`, `created`) VALUES ('sid',
>>> '8fee7c4fe462305bdbb0acad830137f0d40af5a2', 'admin', 1, '2012-07-13
>>> 16:01:47', '2012-07-13 16:01:47')
>>> 11169 2SELECT `UsersCertification`.`certification_id` FROM
>>> `competence`.`users_certifications` AS `UsersCertification` WHERE
>>> `UsersCertification`.`user_id` = 5
>>> 000 3BEGIN
>>> The debug information on the page is
>>>
>>>
>>>
>>>
>>>- CORE\Cake\Model\Model.php line 
>>> 1884<http://localhost/cake/competence/users/add#>→ 
>>> DboSource->insertMulti(AppModel,
>>>array, array) <http://localhost/cake/competence/users/add#>
>>>
>>>object(AppModel) {
>>> useDbConfig => 'default'
>>> useTable => 'users_certifications'
>>> id => false
>>> data => array([maximum depth reached])
>>> schemaName => 'competence'
>>> table => 'users_certifications'
>>> primaryKey => 'id'
>>> validate => array([maximum depth reached])
>>> validationErrors => array([maximum depth reached])
>>> validationDomain => null
>>> name => 'UsersCertification'
>>> alias => 'UsersCertification'
>>> tableToModel => array(
>>> [maximum depth reached]
>>> )
>>> cacheQueries => false
>>> belongsTo => array([maximum depth reached])
>>> hasOne => array([maximum depth reached])
>>> hasMany => array([maximum depth reached])
>>> hasAndBelongsToMany => array([maximum depth reached])
>>> actsAs => null
>>> Behaviors => object(BehaviorCollection) {}
>>> whitelist => array([maximum depth reached])
>>> cacheSources => true
>>> findQueryType => null
>>> recursive => (int) 1
>>>     order => null
>>> virtualFields => array([maximum depth reached])
>>> __backAssociation => array([maximum depth reached])
>>> __backInnerAssociation => array([maximum depth reached])
>>> __backOriginalAssociation => array([maximum depth reached])
>>> __backContainableAssociation => array([maximum depth reached])
>>> findMethods => array(
>>> [maximum depth reached]
>>> )
>>> tablePrefix => ''
>>>}
>>>array(
>>> (int) 0 => '`user_id`',
>>> (int) 1 => '`certification_id`'
>>>)
>>>array(
>>> (int) 1 => array(
>>> (int) 0

Re: Problem with adding records

2012-07-13 Thread mohit kumar
Thanks for your response,

I have already deleted the user table once..
The code is mostly used from the bake tool.

Here is the snapshot of my UsersController.
https://github.com/mohitkr05/Competence/blob/master/Controller/UsersController.php

There are no entry for id=0;

mysql> SELECT id,username FROM users WHERE id=0;
Empty set (0.16 sec)


My snapshot of user table

++---+
| id | username  |
++---+
|  1 | vaibhav   |
|  2 | vaibhav   |
|  3 | mohitkr05 |
|  4 | vishal|
++---+
4 rows in set (0.03 sec)

and its sql is

CREATE TABLE IF NOT EXISTS `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) DEFAULT NULL,
  `password` varchar(50) DEFAULT NULL,
  `role` varchar(20) DEFAULT NULL,
  `experience` int(11) NOT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
)

Thanks for your help.

On Fri, Jul 13, 2012 at 1:58 PM, Mike Griffin  wrote:

> On Wed, Jul 11, 2012 at 2:39 PM, mohit kumar  wrote:
> > Hi Folks,
> >
> > I created an add action for users,
> > I am trying to register them using this action. Everything is going fine,
> > the data is being submitted, the passwords are being hash and if I check
> the
> > registration is happening. But I am getting the following error.
> >
> >> Integrity constraint violation: 1062 Duplicate entry '0' for key
> 'PRIMARY'
>
> There shouldn't be an id of 0 if its auto incrementing. Did you set an
> auto_increment_offset anywhere?
> What is your add action? Post the code here so we can see if the id is
> being set anywhere.
>
> What happens if you run:
> SELECT id,username FROM users WHERE id=0;
>
> Mike.
>
> --
> 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 group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>



-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Looping through actions?

2012-07-12 Thread mohit
Thanks Greg

On Thursday, July 12, 2012 11:55:13 AM UTC+5:30, Greg wrote:
>
> http://php.net/manual/en/function.get-class-methods.php
>
> alternatively use reflection.
>
>
> On Thu, Jul 12, 2012 at 3:59 PM, mohit kumar  wrote:
>
>> Just a query.. 
>> Is it possible to loop through all the actions of all the controllers.?
>>
>> Thanks and Regards,
>> -- 
>> Best Regards,
>> Mohit Kumar
>>
>>
>>  -- 
>> 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 group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
>> at http://groups.google.com/group/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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Looping through actions?

2012-07-11 Thread mohit kumar
Just a query..
Is it possible to loop through all the actions of all the controllers.?

Thanks and Regards,
-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem with adding records

2012-07-11 Thread mohit kumar
mysql> DESCRIBE users;
++-+--+-+-++
| Field  | Type| Null | Key | Default | Extra  |
++-+--+-+-++
| id | int(11) | NO   | PRI | NULL| auto_increment |
| username   | varchar(50) | YES  | | NULL||
| password   | varchar(50) | YES  | | NULL||
| role   | varchar(20) | YES  | | NULL||
| experience | int(11) | NO   | | NULL||
| created| datetime| YES  | | NULL||
| modified   | datetime| YES  | | NULL||
++-+--+-+-++
7 rows in set (0.01 sec)

On Thu, Jul 12, 2012 at 2:01 AM, lowpass  wrote:

> Are you setting the id in the data array for some reason?
>
> It looks like you're using mysql. What is the output of "DESCRIBE
> users;" in mysql terminal?
>
> On Wed, Jul 11, 2012 at 3:10 PM, mohit kumar  wrote:
> > yes., auto increment is set for id
> >
> > On Wed, Jul 11, 2012 at 7:21 PM, Max Dörfler <
> max.doerf...@googlemail.com>
> > wrote:
> >>
> >> Is the Auto Increment attribute set for the ID column?
> >>
> >>
> >> On 07/11/2012 03:39 PM, mohit kumar wrote:
> >>
> >> Hi Folks,
> >>
> >> I created an add action for users,
> >> I am trying to register them using this action. Everything is going
> fine,
> >> the data is being submitted, the passwords are being hash and if I
> check the
> >> registration is happening. But I am getting the following error.
> >>
> >>> Integrity constraint violation: 1062 Duplicate entry '0' for key
> >>> 'PRIMARY'
> >>
> >>
> >> I googled it to found a link which states that
> >>
> >>> The only way we could fix it, is by rebuilding the entire database from
> >>> scratch.
> >>>
> >>> Dropping all tables and reloading them from a backup.
> >>
> >>
> >> I tried that also , still getting that error.
> >>
> >> Thanks for help in advance
> >>
> >> --
> >> Best Regards,
> >> Mohit Kumar
> >>
> >>
> >> --
> >> 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 group, send email to
> >> cake-php+unsubscr...@googlegroups.com For more options, visit this
> group
> >> at http://groups.google.com/group/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 group, send email to
> >> cake-php+unsubscr...@googlegroups.com For more options, visit this
> group
> >> at http://groups.google.com/group/cake-php
> >
> >
> >
> >
> > --
> > Best Regards,
> > Mohit Kumar
> >
> >
> > --
> > 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 group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this
> group at
> > http://groups.google.com/group/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 group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>



-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Bad Redirect with auth component.

2012-07-11 Thread mohit kumar
thats silly of me :(

On Thu, Jul 12, 2012 at 2:01 AM, Tilen Majerle wrote:

> 'loginRedirect'=> array('controller'=>'users','controller'=>'edit' ),
> 'logoutRedirect'=> array('controller'=>'users','controller'=>'logout' )
>
> you have twice 'controller'
>
> listen what lowpass said :)
> --
> Lep pozdrav, Tilen Majerle
> http://majerle.eu
>
>
>
> 2012/7/11 lowpass 
>
>> 'action' => 'edit'
>> 'action' => 'index'
>>
>> ;-p
>>
>> On Wed, Jul 11, 2012 at 3:02 PM, mohit kumar  wrote:
>> > Hi Folks,
>> >
>> > Please help
>> >
>> > I have this code in my AppController
>> >
>> >
>> > public $components = array('Session','Auth'=> array(
>> >
>> > //Error to display when user attempts to access an object or action to
>> which
>> > they do not have access.
>> > 'authError' => 'You need to login to access the page',
>> > 'authorize' => array('controller'),
>> > 'loginRedirect'=> array('controller'=>'users','controller'=>'edit' ),
>> > 'logoutRedirect'=> array('controller'=>'users','controller'=>'logout' )
>> > )
>> > );
>> >
>> >
>> > Here are the corresponding functions for login and log out
>> >
>> >> public function login() {
>> >> if ($this->request->is('post')){
>> >> if ($this->Auth->login()) {
>> >> $this->redirect($this->Auth->redirect());
>> >> } else {
>> >> $this->Session->setFlash(__('Invalid username or password,
>> try
>> >> again'));
>> >> }
>> >> }
>> >> }
>> >>
>> >>
>> >> public function logout() {
>> >> $this->Session->setFlash('Good-Bye');
>> >> $this->redirect($this->Auth->logout());
>> >>
>> >> }
>> >
>> >
>> > As per my assumption i should be redirected url/users/edit after login
>> and
>> > url/users/index after logout, but instead i am redirecting to url/edit
>> and
>> > url/index respectively. What seems to be the error? Thanks for your
>> help in
>> > advance
>> >
>> > --
>> > Best Regards,
>> > Mohit Kumar
>> >
>> >
>> > --
>> > 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 group, send email to
>> > cake-php+unsubscr...@googlegroups.com For more options, visit this
>> group at
>> > http://groups.google.com/group/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 group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/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 group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>



-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Problem with adding records

2012-07-11 Thread mohit kumar
yes., auto increment is set for id

On Wed, Jul 11, 2012 at 7:21 PM, Max Dörfler wrote:

>  Is the Auto Increment attribute set for the ID column?
>
>
> On 07/11/2012 03:39 PM, mohit kumar wrote:
>
> Hi Folks,
>
> I created an add action for users,
> I am trying to register them using this action. Everything is going fine,
> the data is being submitted, the passwords are being hash and if I check
> the registration is happening. But I am getting the following error.
>
> Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'
>>
>
> I googled it to found a link which states that
>
> The only way we could fix it, is by rebuilding the entire database from
>> scratch.
>>
>>  Dropping all tables and reloading them from a backup.
>>
>
> I tried that also , still getting that error.
>
> Thanks for help in advance
>
> --
> Best Regards,
> Mohit Kumar
>
>
> --
> 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 group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/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 group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>



-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Bad Redirect with auth component.

2012-07-11 Thread mohit kumar
Hi Folks,

Please help

I have this code in my AppController


public $components = array('Session','Auth'=> array(

//Error to display when user attempts to access an object or action to
which they do not have access.
'authError' => 'You need to login to access the page',
'authorize' => array('controller'),
'loginRedirect'=> array('controller'=>'users','controller'=>'edit' ),
'logoutRedirect'=> array('controller'=>'users','controller'=>'logout' )
)
);


Here are the corresponding functions for login and log out

public function login() {
> if ($this->request->is('post')){
> if ($this->Auth->login()) {
> $this->redirect($this->Auth->redirect());
> } else {
> $this->Session->setFlash(__('Invalid username or password, try
> again'));
> }
> }
> }
>
>
> public function logout() {
> $this->Session->setFlash('Good-Bye');
> $this->redirect($this->Auth->logout());
>
> }
>

As per my assumption i should be redirected url/users/edit after login and
url/users/index after logout, but instead i am redirecting to url/edit and
url/index respectively.* What seems to be the error? *Thanks for your help
in advance

-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Working with Profiles

2012-07-11 Thread mohit kumar
i fixed it ,., thanks, it was a silly mistake

On Wed, Jul 11, 2012 at 10:55 PM, lowpass  wrote:

> On Wed, Jul 11, 2012 at 3:01 AM, mohit kumar  wrote:
> > I have used HABTM to implement it. The problem that I am receiving is I
> am
> > getting is
> >
> > SQLSTATE[42S22]: Column not found: 1054 Unknown column
> > 'UsersCertification.user_id' in 'on clause'
> >
> > Any ideas?
>
> Not without knowing what the UsersCertification class is, its
> relationship to other classes, and your code.
>
> --
> 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 group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>



-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Problem with adding records

2012-07-11 Thread mohit kumar
Hi Folks,

I created an add action for users,
I am trying to register them using this action. Everything is going fine,
the data is being submitted, the passwords are being hash and if I check
the registration is happening. But I am getting the following error.

Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'
>

I googled it to found a link which states that

The only way we could fix it, is by rebuilding the entire database from
> scratch.
>
> Dropping all tables and reloading them from a backup.
>

I tried that also , still getting that error.

Thanks for help in advance

-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Working with Profiles

2012-07-11 Thread mohit kumar
I have used HABTM to implement it. The problem that I am receiving is I am
getting is

** SQLSTATE[42S22]: Column not found: 1054 Unknown column
'UsersCertification.user_id' in 'on clause'

Any ideas?


On Wed, Jul 11, 2012 at 12:58 AM, Harsha M V  wrote:

> users(id, name, email,...)
> skills (id, name, description..)
> users_skills (id, user_id, skill_id) --> HABTM join table
>
>  --
> 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 group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>



-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Working with Profiles

2012-07-10 Thread mohit
I have tried searching it over the internet also but I am bit confused.

I have to create an application which has to specify lot of checkboxes for 
profiles which display their skills(more than 80)
A user has to click a skill that he has.

I have a design issue, How to proceed with the schema, I can make a 
database field for each item, but that will not be feasible.

Any ideas or help will be appreciated.

Thanks, 
Mohit

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Table name with no meaning in eglish

2012-04-27 Thread mohit kumar
just follow the Cake naming conventions for non-english words

On Sat, Apr 28, 2012 at 1:11 AM, Mamdouh  wrote:

> Hi I'm new to CakePHP and I'm wondering if I can use as table name a
> words that has no meaning in english. if yes how can I do that ?
> Thank you
>
> --
> 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 group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>



-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Help Regarding ACL

2012-03-18 Thread mohit kumar
Hi Experts,

Need some help,
I am in process of learning of Cake PHP. I was creating an app which needs
ACL feature.
While reading various docs this is what I have learn. Please correct me if
I am wrong

ACL has 2 components, ACO  and ARO

Object(ARO)  Requests - Object(ACO)

Now using the bake tool , i was able to add various tables and aco and aro
tables.
I have added  2 groups to ARO

Aro tree:
---
  [1] Group.2
  [2] Group.3
---

Now i am not able to figure out how to add objects to ACO?

another thing is I am getting the following error, is this due to the fact
i have not added any object to ACO

*Warning* (512): AclNode::node() - Couldn't find Aro node identified by "Array
(
[Aro0.model] => Group
[Aro0.foreign_key] => 1
)
" [*CORE\Cake\Model\AclNode.php*, line *176*]

*Warning* (512): DbAcl::check() - Failed ARO/ACO node lookup in
permissions check.  Node references:
Aro: Array
(
[User] => Array
(
[id] => 1
[username] => mohit
[group_id] => 1
[created] => 2012-03-18 11:02:07
[modified] => 2012-03-18 11:02:07
)

)

Aco: controllers/Pages/display
[*CORE\Cake\Controller\Component\AclComponent.php*, line *303*]

Thanks for help.

Regards,
Mohit









-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Automatic data in field

2012-03-13 Thread mohit kumar
Hi Experts,

This might sound a bit silly. But i am unable to figure out the best
possible way to do so. So need help.

I have created a form with username , which must display the username of
current logged in user.

I am using the following plugin.
https://github.com/chetanvarshney/User-Management-Plugin-for-Cakephp-2.x

Any suggestions

-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Issue with Excel Helper

2012-03-07 Thread mohit kumar
Hi Experts,

I am using this tutorial to set up an excel export helper

http://bakery.cakephp.org/articles/melgior/2010/01/26/simple-excel-spreadsheet-helper
I have followed each and every step. additionally I am using following
helpers in my code

 public $helpers = array('Form', 'Html', 'Excel', 'Time');

Still I am getting this error

Undefined variable: excel [*APP\View\Engineers\index.ctp*, line *40*]


Please suggest

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Need Help

2012-03-01 Thread mohit kumar
Hi Experts,

Greetings!!

Just need some help on good documents and video tutorials on Cake PHP.
I am working with WordPress, for last 2 years.I want to learn cake php.I
have searched internet and found many good tutorials.
But it would be very helpful if you can send me some good links for Cake
PHP on topics such as,

   - Authentication
   - ACL
   - Routing

-- 
Best Regards,
Mohit Kumar

-- 
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 group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php