Re: Help in simple query!

2013-05-28 Thread resting
It will be helpful if you show us what you had done to produce that error.


On Wednesday, 29 May 2013 04:53:39 UTC+8, gonzela2006 wrote:
>
> Hello,
> As you can see on the below image
>
>
> 
> I want to display students that didn't attendance on date 2013-03-01 so 
> the result should be as the following:
> *id name*
> 2 Marta Simon
> 4 Rex Maxwell
> 6 Vivian Ellis
>
> I know this is simple query but I got this error
> Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 
> 'StudentAttendance.date' in 'where clause'
>
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Hi I am new here and I need some assistance

2013-05-28 Thread jeet bajaj
Hey Jose!

As you said your website is made up on CAKEPHP, then i will suggest to
instead to placing the file you download from github "public_htm" directory.
You put those files in "\app\Vendor" folder. and remove the code whatever
you have written in index.php. Beside this i will suggest to make a
function in AppController.php file like


public function fbConnect() {
  App::import('Vendor', 'src/facebook');
  $config = array(
'appId' => '291063454361392',
'secret' => 'a2cf7f82bb6e18bece7eef282d9f9ce7',
'fileUpload' => false, // opcional
);
  $facebook = new Facebook($config); ?>
  return $facebook;
}


I must help you.







On Tue, May 28, 2013 at 4:26 AM, Jose Antonio Amuchastegui  wrote:

> HI
>
> I am not a developer, I am trying to learn php and cakephp and now I am
> trying to set a facebook appi, multi friend request dialog.
>
> I have read dozens of tutorials, pages, facebook wiki, facebook
> documentation, so I am trying to follow the instructions I have gathered.
>
> 1.- I have registered my facebook appi and get my appId and secret key.
> 2.- Downloaded the github files:
>
> My site is based on cakephp, so everything is at public_html directory in
> my server.
>
> 3.- Inside this public_html I create a directory named: php-sdk
> 4.- Inside I uploaded (ftp) the src file I downloaded from github
> 5.- Inside I created an index.php file:
>
>
> require_once("src/facebook.php");
>
> $config = array(
> 'appId' => '291063454361392',
> 'secret' => 'a2cf7f82bb6e18bece7eef282d9f9ce7',
> 'fileUpload' => false, // opcional
> );
>
> $facebook = new Facebook($config); ?>
>
> As I understood, this should let me use facebook sdk, so I went to my 
> software.
>
> Inside the page of my software (template_page_facebook) where I want to 
> enable the Multi Friend Selector Dialog, I wrote this:
>
> http://www.w3.org/1999/xhtml";
>   xmlns: fb = ""> INVITA A TODOS TUS AMIGOS EN FACEBOOK
>   
>  INVITA A TODOS TUS AMIGOS EN FACEBOOK 
>   
>
>   
>  
> http://connect.facebook.net/es_ES/all.js";> 
>
> INVITA A TODOS TUS AMIGOS EN FACEBOOK
>   Invitalos
>
> 
>  sendRequestToRecipients function () {
> var user_ids = document.getElementsByName ("user_ids") [0] Valor.;
> FB.ui ({method: 'apprequests',
>   message: 'Mi gran solicitud.'
>   a: 'user_ids',
>  }, Log.info.bind('send-to-many callback'));
> }
>
> FB.init ({
> Id de aplicación: '291063454361392 ',
> status: true, // comprobar estado de login
> cookie: true, // habilitar cookies para permitir al servidor acceder a la 
> sesión
> sfbml: true, // ejecutar código XFBML
> channel: true,
> channelURL : 'http://www.mywebsite.com/channel.html', // fichero 
> channel.html
> oauth: true,
> frictionlessRequests: true
> init: true,
> level: "debug",
> signedRequest: null,
> trace: false,
> version: "mu",
> viewmode: "website",
> autorun: true
>   });
> 
>   
> 
>
> Then, I created the channel diretory at public_html and inside is a file
> channel.html
>
> The result is "error"
>
> I have read everything, but as i am not developer I think there are
> multiple things I am doing wrong. I also have read:
> https://developers.facebook.com/blog/post/464/:
>
>
> So, any body please can describe me what do I shall do??
>
>
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




containable problem

2013-05-28 Thread Robert Gravel
Hi experts,

I am having an issue with containable. I have no problems returning the
proper records for Attendance condition but the database call will still
return all users in database with empty attendance field.
I need to return only User.school_id that match admin's $session_school_id

tried this
$this->User->Behaviors->attach('Containable');
$from =  $this->data['User']['start_date']['year'] . "-" .
$this->data['User']['start_date']['month'] . "-" .
$this->data['User']['start_date']['day'];
 $to =  $this->data['User']['end_date']['year'] . "-" .
$this->data['User']['end_date']['month'] . "-" .
$this->data['User']['end_date']['day'];
$cond = array('Attendance.created BETWEEN ? AND ?' => array($from, $to),
'Attendance.school_id' => $session_school_id);
// return only school user
$cond2 = array('User.school_id' => $session_school_id);
$users = $this->User->find('all', array('contain' => array('Attendance' =>
array('conditions' => $cond), 'Usermembership', 'User' =>
array('conditions' => $cond2) )));

this gives me Warning (512): Model "User" is not associated with model
"User"

and tried this

$users = $this->User->find('all', array('conditions' => $cond2),
array('contain' => array('Attendance' => array('conditions' => $cond),
'Usermembership' )));

does not work either.

cake 1.3
Thank you
Robert

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Change password

2013-05-28 Thread Igor Borovica
Thanks man.


2013/5/28 André Luis 

> I almost forgot
>
> In the model User, use a method beforeSave to crypt the password.
>
> Em terça-feira, 28 de maio de 2013 14h37min41s UTC-3, André Luis escreveu:
>
>> echo $this->Form->create('User');
>> echo $this->Form->input('password')**;
>> echo $this->Form->input('password_**retype');
>> echo $this->Form->end('Send data');
>>
>> And in controller:
>>
>> public function change_password(){
>> if($this->request->is('post') || $this->request->is('put')){
>> if(!empty($this->request->**data['User']['password']) &&
>> !empty($this->request->data['**User']['password_retype'])){
>> if($this->request->data['User'**]['password'] ==
>> $this->request->data['User']['**password_retype']){
>> $this->User->id=$this->Auth->**user('id');
>> if($this->User->save($this->**request->data)){
>> $this->Session->setFlash('Your password has been
>> changed');
>> } else {
>> $this->Session->setFlash('**Could not change
>> your password due a server problem, try again latter');
>> }
>> } else {
>> $this->Session->setFlash('Your password and your
>> retype must match');
>> }
>> } else {
>> $this->Session->setFlash('**Password or retype not
>> sent');
>> }
>> }
>> }
>>
>>
>> It´s something like this
>>
>> Em sábado, 25 de maio de 2013 14h23min47s UTC-3, Igor Borovica escreveu:
>>>
>>> Can someone help me with change password function in cakephp?
>>
>>  --
> 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 a topic in the
> Google Groups "CakePHP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cake-php/HHGK_-w1EBU/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Help in simple query!

2013-05-28 Thread gonzela2006
Hello,
As you can see on the below image


I want to display students that didn't attendance on date 2013-03-01 so the 
result should be as the following:
*id name*
2 Marta Simon
4 Rex Maxwell
6 Vivian Ellis

I know this is simple query but I got this error
Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 
'StudentAttendance.date' in 'where clause'

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Change password

2013-05-28 Thread André Luis
I almost forgot

In the model User, use a method beforeSave to crypt the password.

Em terça-feira, 28 de maio de 2013 14h37min41s UTC-3, André Luis escreveu:
>
> echo $this->Form->create('User');
> echo $this->Form->input('password');
> echo $this->Form->input('password_retype');
> echo $this->Form->end('Send data');
>
> And in controller:
>
> public function change_password(){
> if($this->request->is('post') || $this->request->is('put')){
> if(!empty($this->request->data['User']['password']) && 
> !empty($this->request->data['User']['password_retype'])){
> if($this->request->data['User']['password'] == 
> $this->request->data['User']['password_retype']){
> $this->User->id=$this->Auth->user('id');
> if($this->User->save($this->request->data)){
> $this->Session->setFlash('Your password has been 
> changed');
> } else {
> $this->Session->setFlash('Could not change your 
> password due a server problem, try again latter');
> }
> } else {
> $this->Session->setFlash('Your password and your 
> retype must match');
> }
> } else {
> $this->Session->setFlash('Password or retype not sent');
> }
> }
> }
>
>
> It´s something like this
>
> Em sábado, 25 de maio de 2013 14h23min47s UTC-3, Igor Borovica escreveu:
>>
>> Can someone help me with change password function in cakephp?
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Change password

2013-05-28 Thread André Luis
echo $this->Form->create('User');
echo $this->Form->input('password');
echo $this->Form->input('password_retype');
echo $this->Form->end('Send data');

And in controller:

public function change_password(){
if($this->request->is('post') || $this->request->is('put')){
if(!empty($this->request->data['User']['password']) && 
!empty($this->request->data['User']['password_retype'])){
if($this->request->data['User']['password'] == 
$this->request->data['User']['password_retype']){
$this->User->id=$this->Auth->user('id');
if($this->User->save($this->request->data)){
$this->Session->setFlash('Your password has been 
changed');
} else {
$this->Session->setFlash('Could not change your 
password due a server problem, try again latter');
}
} else {
$this->Session->setFlash('Your password and your retype 
must match');
}
} else {
$this->Session->setFlash('Password or retype not sent');
}
}
}


It´s something like this

Em sábado, 25 de maio de 2013 14h23min47s UTC-3, Igor Borovica escreveu:
>
> Can someone help me with change password function in cakephp?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Change password

2013-05-28 Thread Igor Borovica


Dana ponedjeljak, 27. svibnja 2013. 20:26:09 UTC+2, korisnik André Luis 
napisao je:
>
> What is your doubt??
>
> Em sábado, 25 de maio de 2013 14h23min47s UTC-3, Igor Borovica escreveu:
>>
>> Can someone help me with change password function in cakephp?
>
>
   Can you give me some advice how to create that form?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




CakePHP, Google Charts Plugin and JsHelper

2013-05-28 Thread Ana Mendes


i wish select an element of dropdownlist (choose a Project) and with 
JSHELPER (ajax) update the GRAPH that show statistics of this Project.

I can choose the Project and through the 'POST' I can generate the array 
graph, but i cannot show the GRAPH. I tested without JSHELPER and show my 
Graph.

MY VIEW CODE:

ESCOLHA O PROJETO:  
Form->select('projects', array($projects), array('multiple' => 
false,
'class' => 'span2',
'id' => 'projectsTest'));
?>


  

  

Js->get('#projectsTest')->event('change', $this->Js->request(array(
'controller' => 'Registos',
'action' => 'timePerProjectIssueTypeChart'
), array(
'update' => '#chart_div',
'async' => true,
'method' => 'post',
'dataExpression' => true,
'data' => $this->Js->serializeForm(array(
'isForm' => true,
'inline' => true
);

?> MY VIEW TIME_PER_PROJECT_ISSUE_TYPE_CHART

 GoogleChart->createJsChart($timePerProjectIssueTypeChart);
?>


I do not put the code of the controllers, because individually tested and 
are working.

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




CakePHP 1.3 Class Shell Could Not Be Loaded (Linux Server)

2013-05-28 Thread Raven Karamihan
*Hi, i'm using cakephp 1.3 and i have a problem with console on live 
system. The shell run smooth on my machine but when it has been to live it 
always says that Class shell could not be load. Any help?*

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Hi I am new here and I need some assistance

2013-05-28 Thread Jose Antonio Amuchastegui
HI

I am not a developer, I am trying to learn php and cakephp and now I am 
trying to set a facebook appi, multi friend request dialog. 

I have read dozens of tutorials, pages, facebook wiki, facebook 
documentation, so I am trying to follow the instructions I have gathered. 

1.- I have registered my facebook appi and get my appId and secret key. 
2.- Downloaded the github files: 

My site is based on cakephp, so everything is at public_html directory in 
my server. 

3.- Inside this public_html I create a directory named: php-sdk
4.- Inside I uploaded (ftp) the src file I downloaded from github
5.- Inside I created an index.php file: 

'291063454361392',
'secret' => 'a2cf7f82bb6e18bece7eef282d9f9ce7',
'fileUpload' => false, // opcional
);

$facebook = new Facebook($config); ?>

As I understood, this should let me use facebook sdk, so I went to my software.

Inside the page of my software (template_page_facebook) where I want to enable 
the Multi Friend Selector Dialog, I wrote this:

http://www.w3.org/1999/xhtml";
  xmlns: fb = ""> INVITA A TODOS TUS AMIGOS EN FACEBOOK
  
 INVITA A TODOS TUS AMIGOS EN FACEBOOK 
  

  
 
http://connect.facebook.net/es_ES/all.js";> 

INVITA A TODOS TUS AMIGOS EN FACEBOOK
  Invitalos


 sendRequestToRecipients function () {
var user_ids = document.getElementsByName ("user_ids") [0] Valor.;
FB.ui ({method: 'apprequests',
  message: 'Mi gran solicitud.'
  a: 'user_ids',
 }, Log.info.bind('send-to-many callback'));
}  

FB.init ({
Id de aplicación: '291063454361392 ',
status: true, // comprobar estado de login
cookie: true, // habilitar cookies para permitir al servidor acceder a la 
sesión
sfbml: true, // ejecutar código XFBML
channel: true,
channelURL : 'http://www.mywebsite.com/channel.html', // fichero 
channel.html
oauth: true,
frictionlessRequests: true
init: true,
level: "debug",
signedRequest: null,
trace: false,
version: "mu",
viewmode: "website",
autorun: true
  });

  


Then, I created the channel diretory at public_html and inside is a file 
channel.html

The result is "error"

I have read everything, but as i am not developer I think there are 
multiple things I am doing wrong. I also have read: 
https://developers.facebook.com/blog/post/464/:


So, any body please can describe me what do I shall do??


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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: $this->Modelname->validator()->add(); works, but shows no messages in view

2013-05-28 Thread iFemke
Thanks for your reaction! I tried it different ways, but it still isn't 
working.

I have this in my controller:
$this->$slug->validator()->add('name', array(
 'notEmpty' => array(
  'rule' => 'notEmpty',
  'message' => 'Vul dit veld in'
 ),
));

I added a screenshot I took from google chrome inspector. There you see my 
Form start (which I made with $this->Form->Create('Newsitem');) and my 
input, which is named 'name'.

I don't see what I'm doing wrong, maybe you or someone else sees it :-)

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


<>