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
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home