Hi,
if i run a local function in a other model, cake display a 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 'getLocalTest' at line 1 [CORE/cake/libs/
model/datasources/dbo_source.php, line 525]
The environment looks like this:
Definition Table:
- cms_folders
- cms_files
Definition Model:
- CmsFolder -> hasMany (CmsFile) the Filename is
'cms_folder.php'
- CmsFile -> belongsTo (CmsFolder) the Filename is
'cms_file.php'
Definition Controller:
- CmsFolders the
Filename is 'cms_folders_controller.php'
- CmsFiles the
Filename is 'cms_files_controller.php'
In the Model 'CmsFolder' i define a dummy function:
function getLocalTest() {
return 'www';
}
I want run the function 'getLocalTest()' in the action 'add' in the
controller 'CmsFilesController'. The Code looks like this.
- debug($this->CmsFile->CmsFolder->getLocalTest());
If this line is running, the error message is displayed. But when i
run the following function, its all ok.
- $cmsFolders = $this->CmsFile->CmsFolder->find('list');
I do not know what the problem is and hope for their help.
Regards Uwe
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---