cakephp

CakePHP adding columns to a table

I have a Profile model/controller in my cake app as well as an index.ctp view in /views/profiles. Now, when I go to add a column to my table that is already filled with data, and then add the corresponding code to the view to pick up this column's data, it just gives me an empty result. My model: <?php class Profile extends App...

Cakephp ajax Autocomplete not working

Hello All, I am using ajax autocomplete in my application, but it is not giving the output. Ajax request to the desired function goes but it is not giving back any response, it is blank. I am also using jquery but it is used for other effects. i added jquery no conflict to avoid the prototype & jquery conflicts. I have tried other a...

Transaction management with multiple models using single transaction commit and rollback

I am new to cakephp. I want to know if it is possible in cakephp to to handle multiple model commit and rollback with single transaction. I want to do some thing like this <?php function add(){ $transaction = begintransaction; if(model1->save()){ if(model2->save()){ if(model3->save(){ } ...

cakePHP to Code Igniter conversion

I want to convert an application from CakePHP to Code Igniter. Has anyone tried to do this? With my CakePHP application almost all the coding has been done in the controller layer, with the models pretty much exactly as they come out of baking. ...

List Contacts from a group from Zend GData

Hi, and thanks for reading. My problem is that I'm trying to get a list of contacts belonging to a group in GData using Zend_Gdata_Query. Using $query = new Zend_Gdata_Query('http://www.google.com/m8/feeds/contacts/default/full/?group=http://www.google.com/m8/feeds/groups/xxx...xxx/base/XXX'); $feed = $gdata->getFeed($query); give m...

CakePHP delete() function is not working

Hello, Im just cracking open cakePHP (v1.3.2). I set it up on my local wamp server, seems to work fine except the delete() function doesn't work. I'm following their blog tutorial exactly, its as simple as it can be so I don't understand why its not working. Heres the function in my PostsController class: function delete($id = NULL) { ...

CakePHP - hasMany not fetching?

Maybe I am just having a slow day, but for the life of me I can't figure out why this is happening. I haven't done CakePHP in a while and I am trying to use the 1.3 version, but this doesn't seem to be working... I have two models: area.php <?php class Area extends AppModel { var $name = 'Area'; var $useTable = 'OR_AREA'; ...

Where to put a recursive function when following MVC?

Hello, I have a recursive function being used to generate a menu on my site. The function is calling a database for each level of children in the menu, and generating html for them. I've currently put this function in a Model part of the code, however, I feel that generating html in the model goes against the MVC. I didn't put it in a...

Web application architecture, and application servers?

Hi, I'm building a web application, and I need to use an architecture that allows me to run it on two servers. The application scrapes information from other sites periodically, and on input from the end user. To do this I'm using Php+curl to scrape the information, Php or python to parse it and store the results in a MySQLDB. Then...

Can i give conditions in contain in cakephp 1.3

hi all, i m facing some problem in find function. im fetching value fro find function.i have model.contian another model . Can i give conditions in contain in cakephp is it possiblehi ...

cakephp contain - condition

my problem is that can i give condition [ 'BookTitleMaster.id' => $xtitid, ] as like below $bbookinfs = $this->BookStockin->BookIssue->find('all', array( 'conditions' => array('return_status' => 2), 'contain' => array( 'BookStockin' => array( 'BookTitleMaster' => array( 'BookTitleMaster.id' =>...

How to use LIKE OR operator using cakephp & mysql.

I am new to cakephp & don't know what is the syntax to use LIKE & OR operator in cakephp with mysql. Can anyone help me? Thanks.. ...

Empty data was able to be stored to the Database in CakePHP even if "Not Null" had been specified.

Hi all, I was doing some self learning on CakePHP 1.26 with Mysql 5. I got a simple table with only one field and had applied "Not Null" to this field. This field in the table was corresponding to a Input text box in a HTML form. I tried not to enter anything into the Input text field, and then I saw that empty data was able to be store...

[CakePHP] How to get ID of current record?

Hi all, another CakePHP framework question... how can I get ID of current record? Tnx in advance!!! ...

Breadcrumbs logic in MVC applications

Hi, where, in your opinnion, should a breadcrumbs path be declared (in other words, in which letter of MVC)? So far I've been declaring it in Controllers, but I've recently started to work with CakePHP, where it is all made in Views and it surprised me. I'm just curious of your opinions. ...

PHP Eclipse - importing existing CakePHP projects

I'm trying to import existing Cake 1.2 projects into PHP Eclipse (latest all-in-one download on Galileo build) - I don't think I understand Eclipse properly: 1) I have created Workspace on my web root C:\Program Files\xampp\htdocs 2) I have created new Project C:\Program Files\xampp\htdocs\EclipseCake ... how do I import my existing ca...

beforeSave() returned some error

Hi all, I got two simple input text fields in a HTML form: <input type="text" name="data[User][name]" id="data[User][name]"> <input type="text" name="data[User][pswd]" id="data[User][pswd]"> The scripts for the Controller's action that captured the data is as follows: function register(){ $temp = $this->data; ...

JQuery AJAX returned too much data that I had not requested

Hi all, I am using CakePHP 1.26 and CDN JQuery in this URL: http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js In a HTML web page, I have these lines of code: $.ajax({ type: "POST", url: "http://mywebsite.com/controllers/avail/"+curl, success: function(data) { alert(data);} }); and in t...

confused of $this in cakePHP

Hi all, I got a few lines of codes in a Model in cakePHP 1.26: function beforeSave() { $this->data['User']['pswd'] = md5($raw['User']['pswd']); return true; } // this beforeSave() works The code above has been tested and it is working in my database. Yet, I am not sure if I can...

Setting up magic routes for plugins in CakePHP 1.3?

I'm working on upgrading my project from CakePHP 1.2 to 1.3. In the process, it seems that the "magic" routing for plugins by which a controller name (e.g.: "ForumsController") matching the plugin name (e.g.: "forums") no longer automatically routes to the root of the plugin URL (e.g.: "www.example.com/forums" pointing to plugin "forums...