Sunday, June 5, 2011

Re: add extra function to model but cakephp thinks it's query???

My inbox is fully spammed by YOUR STUPID QUESTION!!

Kind Regards,

Kevin
http://www.vinshop.us
PIN : 21AD562F
Gtalk: kevin@vinshop.us


From: Tilen Majerle <tilen.majerle@gmail.com>
Sender: cake-php@googlegroups.com
Date: Sun, 5 Jun 2011 11:58:20 +0200
To: <cake-php@googlegroups.com>
ReplyTo: cake-php@googlegroups.com
Subject: Re: add extra function to model but cakephp thinks it's query???

what's wrong with you...yosef...???
--
Lep pozdrav, Tilen Majerle



2011/6/5 <yosef.kevin@gmail.com>
SPAMMMM
Kind Regards,

Kevin
http://www.vinshop.us
PIN   : 21AD562F
Gtalk: kevin@vinshop.us

-----Original Message-----
From: cake-learner <sh.koizumi@gmail.com>
Sender: cake-php@googlegroups.com
Date: Sun, 5 Jun 2011 02:45:59
To: CakePHP<cake-php@googlegroups.com>
Reply-To: cake-php@googlegroups.com
Subject: add extra function to model but cakephp thinks it's query???

I just add an function to model and call that function from another
controller.
but what i get is the following error. What happen?????


In Model( department.php ),

class Department extends AppModel {
  var $useDbConfig = 'default_account';
  function get_child_dep( $dep_id, $child ){
  }
}

In Controll( orgmap_controller.php ),

$this -> loadModel( 'Department' );
$this -> Department -> get_child_dep( 1 )


error message ----
Warning (512): SQL Error: 1064: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'get_child_dep' at line 1 [CORE/cake/libs/
model/datasources/dbo_source.php, line 535]

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

No comments: