Search Results

Search found 768 results on 31 pages for 'cakephp debugkit'.

Page 11/31 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • CakePHP - recursive on specific fields in model?

    - by Paul
    Hi, I'm pretty new to CakePHP but I think I'm starting to get the hang of it. I'm trying to pull related table information recursively, but I want to specify which related models to recurse on. Let me give you an example to demonstrate my goal: I have a model "Customer", which has info like Company name, website, etc. "Customer" hasMany "Addresses", which contain info for individual contacts like Contact Name, Street, City, State, Country, etc. "Customer" also belongsTo "CustomerType", which is just has descriptive category info - a name and description, like "Distributor" or "Manufacturer". When I do a find on "Customer" I want to get associated "CustomerType" and "Address" info as sub-arrays, and this works fine just by setting up the hasMany and belongsTo associations properly. But now, here's my issue: I want to get associated State/Country info. So, instead of each "Address" array row just having "state_id", I want it to have "state" = array("id" = 20, "name" = "New York",...) etc. If I set $recursive to a higher value (e.g., 2) in the Partner model, I get what I want for the State/Country info in each "Address". BUT it also recurses on "CustomerType", and that results in the "CustomerType" field of my "Partner" object having a huge array of all Customer objects that match that type, which could be thousands long. So the point is, I DON'T want to recurse on "CustomerType", only on "Address". Is there a way I can set this up? Sorry for the long-winded question, and thanks in advance!

    Read the article

  • Representing versions of objects with CakePHP

    - by user636901
    Hi people, Have just started to get into CakePHP since a couple of weeks back. I have some experience with MVC-frameworks, but this problem holds me back a bit. I am currently working on a model foo, containing a primary id and some attributes. Since a complete history of the changes of foo is necessary, the content of foo is saved in the table foo_content. The two tables are connected through foo_content.foo_id = foo.id, in Cake with a foo hasMany foo_content-relationship. To track the versions of foo, foo_content also contains the column version, and foo itself the field currentVersion. The version is an number incremented by one everytime the user updates foo. This is an older native PHP-app btw, to be rewritten on top of Cake. 9 times out of 10 in the app, the most recent version (foo.currentVersion) is the db-entry that need to be represented in the frontend. My question is simply: is there someway of representing this directly in the model? Or does this kind of logic simply need to be defined in the controller? Most grateful for your help!

    Read the article

  • cakephp - form for belongsTo Model

    - by user1511579
    I createt the following model to link 2 relational tables: class Ficha extends AppModel { //public $useTable = 'ficha_seg'; var $primaryKey = 'id_ficha'; var $name = 'Ficha'; var $belongsTo = array( 'Perigo' => array( 'className' => 'Perigo', 'foreignKey' => false, 'conditions' => 'Perigo.id_fichas = Ficha.id_ficha' ) ); } Now, i have a form that requires data from the class Ficha, and then is redirected to another ctp page where i will input the data for the table "Perigos". However, since i'm still a newbie in cakephp i'm having difficult building that second form to insert the data on the table "Perigos". Here goes the code i built at the moment related to the second form: FichasController.php (the method where is it supposed to save the data on the table "Perigos": public function preencher_ficha(){ if ($this->request->is('ficha')) { $this->Ficha->create(); if ($this->Ficha->Perigo->save($this->request->data)) { $last_id=$this->Ficha->getLastInsertID(); $this->Session->setFlash('Your post has been updated '.$last_id.'.'); //$this->redirect(array('action' => 'preencher_ficha')); } else { $this->Session->setFlash('Unable to qualquer coisa your post.'); } } } The preencher_ficha.ctp file with the form: echo $this->Form->create('Ficha->Perigo', array('action' => 'index')); echo $this->Form->input('class_subst', array('label' => 'Classificação:')); echo $this->Form->input('simbolos_perigo', array('label' => 'Símbolos:')); echo $this->Form->input('frases_r', array('label' => 'Frases:')); echo $this->Form->end('Finalizar Ficha'); Here i guess the create part is wrong, but i think i have errors too in the controller part.

    Read the article

  • CakePHP - Paginating an Array

    - by Ashok
    Cake handles pagination of a model with a simple $this-paginate(), but what should I use if I want to paginate a array of values? The Scenario is like this: $this->set('sitepages', $this->paginate()); This code in my index() returns an array like Array ( [0] => Array ( [Sitepage] => Array ( [id] => 13 [name] => Home [urlslug] => home [parent_id] => 1 [page_title] => Welcome to KIAMS, Pune [order] => 1 ) ) [1] => Array ( [Sitepage] => Array ( [id] => 26 [name] => About Us [urlslug] => aboutus [parent_id] => 1 [page_title] => [order] => 2 ) ) [2] => Array ( [Sitepage] => Array ( [id] => 27 [name] => Overview of KIAMS [urlslug] => aboutus/overview [parent_id] => 26 [page_title] => [order] => 2 ) ) I retrieved the same data using $this-Sitepage-find('all') and then performed some manipulations as required and form a array which is very similar to the above one, but the ordering gets changed. I want to paginate this new array and pass it to the view. I tried $this->set('sitepages',$this->paginate($newarray)) But the data is not getting paginated. Can some one please help with paginating the $newarray in CakePHP?

    Read the article

  • Pass Element value to $ajax->link in cakephp

    - by TwoThumbs
    I need to pass the value of an element to an $ajax-link without using a form/submit structure. (because I have a dynamically set number of clickable links through which I am triggering the action) I used to do this in Ruby using the Prototype javascript function $F like this: <%= link_to_remote "#{item.to_s}", :url => { :action => :add_mpc }, :with => "'category=' + $F('mpc_category')" -%> But this does not seem to work in Cakephp: <?php echo $ajax->link(substr($vehicle['vehicles']['year'], -2), array('action' => 'add_mpc', 'category' => '$F("mpc_category")'), array('update' => 'results', 'position' => 'top')); ?> PHP sees $F as a variable instead of a call to javascript. I'm not too familiar with Javascript, but is there another way to pass the value of the 'mpc_category' input element to the controller through this link? I have been looking for a couple days and can't find anyone dealing with this specific issue. Thanks for any assistance. Edit: fixed syntax in php statement.

    Read the article

  • Cakephp 2.2 Blog Tutorial undefined constant errors

    - by user1741925
    Have copy pasted the code from Blog tutorial in cakephp 2.2 but its not working. Getting the following errors. Notice (8): Use of undefined constant Html Notice (8): Use of undefined constant Form Notice (8): Use of undefined constant posts Notice (8): Use of undefined constant all Notice (8): Undefined index: all Below is the code for PostsController and index.ctp. <?php class PostsController extends AppController { public $helpers = array(’Html’, ’Form’); public function index() { $this->set(’posts’, $this->Post->find(’all’)); } public function view($id = null) { $this->Post->id = $id; $this->set(’post’, $this->Post->read()); } } ?> index.ctp <h1>Blog posts</h1> <table> <tr> <th>Id</th> <th>Title</th> <th>Created</th> </tr> <?php foreach ($posts as $post): ?> <tr> <td><?php echo $post[’Post’][’id’]; ?></td> <td> <?php echo $post[’Post’][’title’]; ?> </td> <td><?php echo $post[’Post’][’created’]; ?></td> </tr> <?php endforeach; ?> <?php unset($post); ?> </table>

    Read the article

  • auth component issue

    - by madphp
    Im trying to get my admin routing working with the auth component. I want the following routing to work. Router::connect('/admin', array('controller' => 'pages', 'action' => 'index', 'admin' => true)); but when i type in /admin it redirects to /admin/users/login and display this error. Create UsersController::admin_login() in file: cms.local/controllers/users_controller.php here is my app_controller code. class AppController extends Controller { var $components = array('DebugKit.Toolbar','Auth','Session'); function beforeFilter(){ //Set up Auth Component $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login'); $this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'admin_index'); $this->Auth->allow('display'); } } users_controller <?php class UsersController extends AppController { var $name = 'Users'; function login(){ } function admin_logout(){ $this->Session->destroy(); $this->redirect($this->Auth->logout()); } } ?> If you require more information let me know. Thanks

    Read the article

  • CakePHP Help with Blog Tutorial

    - by Cameron
    I've just been following the tutorial on the CakePHP website to create a simple Blog as a way to learn a bit about Cake. However I have run into an error and not sure why as I have followed exactly what the tutorial says. The errors: Notice (8): Undefined property: View::$Html [APP/views/posts/index.ctp, line 17] Fatal error: Call to a member function link() on a non-object in /Users/cameron/Sites/dentist/app/views/posts/index.ctp on line 17 Here is my posts_controller <?php class PostsController extends AppController { var $helpers = array('Html', 'Form'); var $name = 'Posts'; function index() { $this->set('posts', $this->Post->find('all')); } function view($id = null) { $this->Post->id = $id; $this->set('post', $this->Post->read()); } } ?> and here is my model <?php class Post extends AppModel { var $name = 'Post'; } ?> and here are my views <!-- File: /app/views/posts/index.ctp --> <h1>Blog posts</h1> <table> <tr> <th>Id</th> <th>Title</th> <th>Created</th> </tr> <!-- Here is where we loop through our $posts array, printing out post info --> <?php foreach ($posts as $post): ?> <tr> <td><?php echo $post['Post']['id']; ?></td> <td> <?php echo $this->Html->link($post['Post']['title'], array('controller' => 'posts', 'action' => 'view', $post['Post']['id'])); ?> </td> <td><?php echo $post['Post']['created']; ?></td> </tr> <?php endforeach; ?> </table>

    Read the article

  • Displaying a message in a dialog box using AJAX, jQuery, and CakePHP

    - by LainIwakura
    I have a form, and when users submit this form, it should pass the data along to a function using AJAX. Then, the result of that is displayed to the user in a dialog box. I'm using CakePHP (1.3) and jQuery to try and accomplish this but I feel like I'm running into the ground. The form will eventually be used for uploading images with tags, but for now I just want to see a message pop up in the box.. The form: <?php echo $this->Form->create('Image', array('type' => 'file', 'controller' => 'images', 'action' => 'upload', 'method' => 'post')); echo $this->Form->input('Wallpaper', array('type' => 'file')); echo $this->Form->input('Tags'); echo $this->Form->end('Upload!'); ?> The AJAX: $(document).ready(function() { $("#ImageUploadForm").submit(function() { $.ajax({ type: "POST", url: "/images/upload/", data: $(this).serialize(), async: false, success: function(html){ $("#dialog-modal").dialog({ $("#dialog-modal").append("<p>"+html+"</p>"); height: 140, modal: true, buttons: { Ok: function() { $(this).dialog('close'); } } }) } }); return false; }); }); NOTE: if I put $("#dialog-modal").dialog({ height: 140, modal: true }); OUTSIDE of the $.ajax but inside the $("#ImageUploadForm").submit(function() { and comment out the $.ajax stuff, I WILL see a dialog box pop up and then I have to click it for it to go away. After this, it will not forward to the location /images/upload/ The method that AJAX calls: public function upload() { $this->autoRender = false; if ($this->RequestHandler->isAjax()) { echo 'Hi!'; exit(); } } $this-RequestHandler-isAjax() seems to do either absolutely nothing, or it is always returning false. I have never entered an if statement with that as the condition. Thanks for all the help, if you need more information let me know.

    Read the article

  • CakePHP Multiple Nested Joins

    - by Paul
    I have an App in which several of the models are linked by hasMany/belongsTo associations. So for instance, A hasMany B, B hasMany C, C hasMany D, and D hasMany E. Also, E belongs to D, D belongs to C, C belongs to B, and B belongs to A. Using the Containable behavior has been great for controlling the amount of information comes back with each query, but I seem to be having a problem when trying to get data from table A while using a condition that involves table D. For instance, here is an example of my 'A' model: class A extends AppModel { var $name = 'A'; var $hasMany = array( 'B' => array('dependent' => true) ); function findDependentOnE($condition) { return $this->find('all', array( 'contain' => array( 'B' => array( 'C' => array( 'D' => array( 'E' => array( 'conditions' => array( 'E.myfield' => $some_value ) ) ) ) ) ) )); } } This still gives me back all the records in 'A', and if it's related 'E' records don't satisfy the condition, then I just get this: Array( [0] => array( [A] => array( [field1] => // stuff [field2] => // more stuff // ...etc ), [B] => array( [field1] => // stuff [field2] => // more stuff // ...etc ), [C] => array( [field1] => // stuff [field2] => // more stuff // ...etc ), [D] => array( [field1] => // stuff [field2] => // more stuff // ...etc ), [E] => array( // empty if 'E.myfield' != $some_value' ) ), [1] => array( // ...etc ) ) When If 'E.myfield' != $some_value, I don't want the record returned at all. I hope this expresses my problem clearly enough... Basically, I want the following query, but in a database-agnostic/CakePHP-y kind of way: SELECT * FROM A INNER JOIN (B INNER JOIN (C INNER JOIN (D INNER JOIN E ON D.id=E.d_id) ON C.id=D.c_id) ON B.id=C.b_id) ON A.id=B.a_id WHERE E.myfield = $some_value

    Read the article

  • Cakephp file upload problem.

    - by vatismarty
    I am using Cakephp as my framework. I have a problem in uploading my files through a form. I am using an Uploader plugin from THIS website. My php ini file has this piece of code. upload_max_filesize = 10M post_max_size = 8M this is from uploader.php -- plugin file has var $maxFileSize = '5M'; //default max file size In my controller.php file, i use this code to set max file size as 1 MB at runtime. function beforeFilter() { parent::beforeFilter(); $this->Uploader->maxFileSize = '1M'; } In the uploader.php, we perform this ... if (empty($this->maxFileSize)) { $this->maxFileSize = ini_get('upload_max_filesize'); //landmark 1 } $byte = preg_replace('/[^0-9]/i', '', $this->maxFileSize); $last = $this->bytes($this->maxFileSize, 'byte'); if ($last == 'T' || $last == 'TB') { $multiplier = 1; $execTime = 20; } else if ($last == 'G' || $last == 'GB') { $multiplier = 3; $execTime = 10; } else if ($last == 'M' || $last == 'MB') { $multiplier = 5; $execTime = 5; } else { $multiplier = 10; $execTime = 3; } ini_set('memore_limit', (($byte * $multiplier) * $multiplier) . $last); ini_set('post_max_size', ($byte * $multiplier) . $last); //error suspected here ini_set('upload_tmp_dir', $this->tempDir); ini_set('upload_max_filesize', $this->maxFileSize); //landmark 2 EXPECTED RESULT: When i try uploading a file that is 2MB of size, it shouldn't take place because maxFileSize is 1MB at run time. So upload should fail. THE PROBLEM IS : But it is getting uploaded. Landmark 1 does not get executed. (in comments)... land mark 2 does not seem to work... upload_max_filesize does not get the value from maxFileSize. Please help me... thank you

    Read the article

  • cakephp datetime insertion behaviour

    - by littlechad
    hi everyone this is a cakePHP question about datetime database insertion mismatch, i jumped in to this project while the whole thing is already built around 70%. here's what happen, every time i insert a data that contain a datetime, the inserted time doesn't match the inputted date, and the mismatch has no pattern or what ever, in some table the differences is 5 hours, while in others it could be 12 hours, 7 hours, or even 15 hours. i have traced this by investigating the controller, the model, the app_controller, everything but i don't find anything that indicate a datetime insertion rules. if the view : echo $form->input('start_date', array('label' => __l('start date')); i can't even find in the controller anything like: $this->data['current_controller']['start_date'] = $this->data['current_controller']['start_date']; when i use pr($this-data); to print the posted data, this is shown: [start_date] => Array ( [month] => 02 [day] => 16 [year] => 2011 [hour] => [min] => [meridian] => ) so i figured doing something like: $yearMonDay = $this->data['current_controller']['start_date']['year']."-"; $yearMonDay .= $this->data['current_controller']['start_date']['month']."-"; $yearMonDay .= $this->data['current_controller']['start_date']['day']; if(!empty($this->data['current_controller']['start_date']['hour'])){ $hourMinSec = $this->data['current_controller']['start_date']['hour'].":"; $hourMinSec .= $this->data['current_controller']['start_date']['min'].":"; $hourMinSec .= $this->data['current_controller']['start_date']['meridian']; }else{ $hourMinSec = "00:00:00"; } $this->data['Deal']['start_date'] = $yearMonDay." ".$hourMinSec; just to make sure the funny thing is that those posted datetime is inserted into the database with the mismatch value anyway. it's getting pretty frustrating, is there any suggestion on where else should i find the codes that define how the datetime should be inserted? or probably give me a clue on how to override those mismatched insertion rules? thanks

    Read the article

  • Cakephp query doesn't render correct data

    - by user2915012
    I'm totally new in cakephp and fetching problem at the time of query to render data I tried this to find out categories/warehouses table info but failed.. $cart_products = $this->Order->OrdersProduct->find('all', array( 'fields' => array('*'), 'contain' => array('Category'), 'joins' => array( array( 'table' => 'products', 'alias' => 'Product', 'type' => 'LEFT', 'conditions' => array('Product.id = OrdersProduct.product_id') ), array( 'table' => 'orders', 'alias' => 'Order', 'type' => 'LEFT', 'conditions' => array('Order.id = OrdersProduct.order_id') ) ), 'conditions' => array( 'Order.store_id' => $store_id, 'Order.order_status' => 'in_cart' ) )); I need the result something like this... Array ( [0] => Array ( [OrdersProduct] => Array ( [id] => 1 [order_id] => 1 [product_id] => 16 [qty] => 10 [created] => 2013-10-24 08:04:33 [modified] => 2013-10-24 08:04:33 ) [Product] => Array ( [id] => 16 [part] => 56-987xyz [title] => iPhone 5 battery [description] => iPhone 5c description [wholesale_price] => 4 [retail_price] => 8 [purchase_cost] => 2 [sort_order] => [Category] => array( [id] => 1, [name] => Iphone 5 ) [Warehouse] => array( [id] => 1, [name] => Warehouse1 ) [weight] => [created] => 2013-10-22 12:14:57 [modified] => 2013-10-22 12:14:57 ) ) ) How can I find this? Can anybody help me? thanks

    Read the article

  • PHP Frameworks (CodeIgnitor, Yii, CakePHP) vs. Django

    - by niting
    I have to develop a site which has to accomodate around 2000 users a day and speed is a criterion for it. Moreover, the site is a user oriented one where the user will be able to log in and check his profile, register for specific events he/she wants to participate in. The site is to be hosted on a VPS server.Although I have pretty good experience with python and PHP but I have no idea how to use either of the framework. We have plenty of time to experiment and learn one of the above frameworks.Could you please specify which one would be preferred for such a scenario considering speed, features, and security of the site. Thanks, niting

    Read the article

  • cakephp routing problem, plugin routing works but not others

    - by Paul
    I'm having a strange routing problem with a site I just uploaded, and I've made a number of changes to test what's happening. It doesn't make any sense. My setup is: - I'm using one plugin, which I've included all the routing in the routes.php file. - I've also included the routes for two other controllers, 'events' and 'updates' they look like this: Router::connect('/login', array('plugin' = 'pippoacl', 'controller' = 'users', 'action' = 'login')); Router::connect('/logout', array('plugin' = 'pippoacl', 'controller' = 'users', 'action' = 'logout')); Router::connect( '/events/', array( 'controller' = 'events', 'action' = 'index')); Router::connect('/updates', array('controller' = 'updates', 'action' = 'index')); What happens when I try to get to 'events' is that I get an error message saying: "Not Found Error: The requested address '/Events' was not found on this server." I've checked the database and it's accessible, through the plugin's model/controller/view. I've also made sure the model/controllers for 'events' and 'updates' are there. Can anyone tell me how to trouble shoot this? Thanks, Paul

    Read the article

  • JQuery tools.scrollable conflict with navbar Ajax in CakePHP

    - by user269098
    In our views/layout/default.ctp file we have an element that's used to implement a cascading combo select box which uses JQuery ajax to update the fields. This selector is part of our navbar and is loaded on every page of the site. The default.ctp has these includes in the : <?php echo $html->charset(); ?> <title><?php echo $title_for_layout; //if(Configure::read('debug')) //echo "cake: " . Configure::version(); ?></title> <?php echo $html->css('style'); echo $javascript->link('jquery', true); echo $javascript->link('jquery.form', true); echo $javascript->link('jquery.url', true); echo $javascript->link('navbar', true); echo $html->script('tools.expose-1.0.3.js', array('inline' => false)); //echo $scripts_for_layout; ?> On the views/cars/index.ctp page we have: echo $javascript->link('tools.tabs-1.0.1', true); echo $javascript->link('tools.overlay-1.0.4', true); echo $javascript->link('jquery.form', true); echo $javascript->link('tools.scrollable-1.0.5', true); The issue is that on every other page the navbar combo box selector works. However, on the cars/index.ctp it doesn't work. It only works when we comment out the 'tools.scrollable' include. Any ideas why there is this conflict? We have been stuck on this problem for months...

    Read the article

  • Naming conventions and field naming question for CakePHP

    - by jphenow
    Okay so two questions very related: 1) Does following the naming convention for classes, controllers, database fields, etc. affect the framework's ability to work the way it was intended? (I'm a little new to working with a framework from the beginning of app development) 2) This question is more important if 1 is a yes. Say I have a table, A, that has 2 foreign keys pointing at the same table, B, but different entries (they're like edges of a graph that point at two vertices) how would I follow the naming convention of their database fields? All I can think to do is something like vertex_1_id and vertex_2_id but I don't know how the framework would handle that if the naming conventions are necessary for its functioning correctly.

    Read the article

  • CakePHP counterCache

    - by Daniel
    I'm using counterCache to track the number of chapters that have been posted to their related stories. This all works fine, apart from the fact that when the chapter_count field in the database gets updated, the modified field for that record does not. Is there any way that I can set Cake to automatically update the modified field when the counterCache functionality runs? Thank you.

    Read the article

  • CakePHP - How to use onError in Model

    - by Richard
    I've created a custom datasource which fetches data from a web api, and I'm now looking at implementing error handling. In the datasource, I'm calling $model-onError(). In the model, I've created the onError method, and I can access error details with $this-getDataSource()-error; However I can't redirect or set a flash message because that can only take place in the controller, so what should I be doing here to communicate the error to the user?

    Read the article

  • cakePHP paginate with post data without sessions, serialization or post to get

    - by openprojdevel
    I have created a small search and filter form method post in controller/index, which posts to it self the conditions and fields to paginate ( $this-paginate($conditions) ) However that is good for the first page, the subsequent pages the filer conditions are lost. pagination passArgs supports get variables well. Is there an un complex way to pass the post conditions to the other paginated pages? The method I have looked at is pass the $conditions in session , which isnt without complexity of assigning session and unset the session on submitting the form again (more refinements to the filter criteria by the user ) The other method is passing the $conditions as serialized string url_encode as an get parameter. Is there an good cake way to do this more like passArgs, sessions and url encode do not look like cake style. Thanks

    Read the article

  • Merge entries in CakePHP

    - by Andrea
    Let's say I have a Model, for example User, and I want to merge two instances of this Model, say merge User2 into User1. Explicitly this is what I mean: If a field is already filled in User1, it should remain the same If a field is missing in User1 but is present in User2, it should be copied If SomeModel BelongsTo User, every instance of SomeModel pointing to User2 should be modified to point to User1 Same if SomeModel HasAndBelongsToMany User If SomeModel HasMany User, and SomeModel1 Has User2 but no other instance Has User1, it should be modified so that SomeModel1 has User1 instead If SomeModel HasMany User, SomeModel1 Has User1 and SomeModel2 Has User2... well, I'm not sure here, I guess the only solution is to discard SomeModel2, since User1 can BelongTo only one SomeModel. Finally User2 should be removed. Is there a way to automate this? Maybe a Behaviour? If not, I may consider creating it, since I will need it a lot.

    Read the article

  • Not saving all data in cakephp

    - by madphp
    Hi, Im doing a simple save, and its not entering all the data. I have two models, message and emailmessage. The message table is getting populated ok, but the emailmessage table, is only getting the foreign key message_id. Below is the code. Anyone notice anything unsual? EmailMessageModel - http://pastebin.com/tjNewnBw MessageModel - http://pastebin.com/57FSgAGZ EmailMessageController - http://pastebin.com/AD0wNawx Data - http://pastebin.com/8bzknwpu Thanks --Mark

    Read the article

  • Cakephp Function in mode not executing

    - by Rixius
    I have a function in my Comic Model as such: <?php class Comic extends AppModel { var $name = "Comic"; // Methods for retriving information. function testFunc(){ $mr = $this->find('all'); return $mr; } } ?> And I am calling it in my controller as such: <?php class ComicController extends AppController { var $name = "Comic"; var $uses = array('Comic'); function index() { } function view($q) { $this->set('array',$this->Comic->testFunc()); } } ?> When I try to load up the page; I get the following error: 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 'testFunc' at line 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 525] Query: testFunc And the SQL dump looks like this: (default) 2 queries took 1 ms Nr Query Error Affected Num. rows Took (ms) 1 DESCRIBE comics 10 10 1 2 testFunc 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 'testFunc' at line 1 0 So it looks like, instead of running the testFunc() function, it is trying to run a query of "testFunc" and failing...

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >