Heyall,
I am using a very intrinsic database with a CakePHP application and so far my multi-models views and controllers are working fine. I have a singular table (Entity) that have it's id on several other tables as the Foreign Key entity_id
Some tables are one to one relations (Like a Company is one Entity) and some are one to many (...
When using the paginator helper in cakephp views, it doesnt remember parts of the url that are custom for my useage.
For example:
http://example.org/users/index/moderators/page:2/sort:name/dir:asc
here moderators is a parameter that helps me filter by that type. But pressing a paginator link will not include this link.
...
Given :
Group hasMany Persons
but the relationship is independent (ie. Persons can exist without belonging to a Group), should the foreign key in the persons table (ie group_id) be set to 0 (or NULL) when deleting a group? If you do not, the person will try to belong to a group that does't exist.
The reason I ask is that this is...
Hello,
I am not sure if I formulated the question right, but still ...
I have a view that shows a flash embed and this flash take as parameter a /controller/action URL that generates a XML. I nee to send, from this view, an array to the XML generator action. How is the best way ? Is there some helper->set() method like or I have to cre...
I am currently plowing my way through IBM's tutorial on CakePHP
At one point I run into this snippet of code:
<?php
class Dealer extends AppModel
{
var $name = 'Dealer';
var $hasMany = array ('Product' => array(
'className' => 'Product',
'conditions'=>, // is this allowed?
'order'=>, // same thing here
'foreignKey'=>'dealer_id')
);
}
?...
I'm trying to use Microsoft Access as the db for a demo project that I'm thinking of doing in either Code Igniter or CakePHP. Ignoring the possibly folly of using MS Access, I haven't been able to figure out precisely how the connection string corresponds to the frameworks' db settings. In straight php, I can use this code to connect to ...
Basically I have two models that are associated, but im building them to work both with and without an existing database (basically they degrade by not remembering settings). I can do $this->AssociatedModel->find() in my models when they are using a table, but for some reason I get
Undefined property: Model::$AssociatedModel [APP\plug...
OK, so I'm trying to teach myself the CakePHP framework, and I'm trying to knock up a simple demo app for myself.
I have the controllers, views and models all set up and working, but I want to do something slightly more than the basic online help shows.
I have a guitars_controller.php file as follows...
<?php
class GuitarsController e...
Hey all I'm hoping someone has enough experience with Cake PHP to make this work.
I'm working on something that at the moment could affectionately be called a twitter clone. Essentially I have a set up like this.
Users have many friends. This is a many to many relationship to the user table. It is stored in a link tabled called frien...
In CakePHP putting a querystring in the url doesn't cause it to be automatically parsed and split like it normally is when the controller is directly invoked.
For example:
$this->testAction('/testing/post?company=utCompany', array('return' => 'vars')) ;
will result in:
[url] => /testing/post?company=utCompany
While invoking the u...
Does anybody knows how to redirect parent page from an ajax call. I made an ajax call to the server and from controller function that handles the call I whant to go to another page. Usually this function updates an element from current page , but in some cases I want to redirect browser to another page...
...
I've got a model in CakePHP that doesn't have a table, called Upload. I've got a validation in this Model for a field called source_id.
I've got a form that builds a nice looking $this-data, giving me a well formated set, including:
$this->data['Upload']['source_id']
However, the validation rule I have set doesn't seem to run at all....
Has anybody been able to use CakePHP in Visual Studio using Phalanger
...
I am a Cake PHP novice.
I want to edit the table "Issue". This table contains a field "priority_id" related to another table called "Priority" by an foreign key. This table contains three values "Severe", "Disaster", "ToDo". User can select the priority using a combobox (input select).
The priorities are loaded like this:
$priorities...
I have the need to create the functionality to allow my registered users to associate themselves with other uses and create a family. My database tables look something like this:
db.persons - (Bob, Jane, Timmy, etc)
id
name
email
db.persons_persons
id
person__id_parent
person_id_child
relationtype_id
db.relationtypes - (spouse, ...
I'd like to link to some PDFs in one of my controller views. What's the best practice for accomplishing this? The CakePHP webroot folder contains a ./files/ subfolder, I am confounded by trying to link to it without using "magic" pathnames in my href (e.g. "/path/to/my/webroot/files/myfile.pdf").
What are my options?
EDIT: I didn't ade...
I'm new to CakePHP but I've been though their FAQs and guides to no avail. This is so simple that I just must not be thinking straight:
How can I access a parameter sent through the URL within my view files?
Example: http://example.com/view/6
How would I take that parameter ("6") and cycle it through the controller to another view p...
Hey all,
I'm trying to get authentication working to my liking in a cake php app and running into a snag.
I want to let the user login from either the home page or from a dedicated login page. I'm using the Auth component to manage login and right now the login itself works. I am submitting the form on the home page to /Users/Login a...
I'm looking at a new project and we are wanting to use Flex (to provide the easy integration with AIR and provide a desktop app for our project). How easy does CakePHP play with Flex or is there a better PHP framework to use with Flex, or should we use none?
...
Hi All
I am a newbie in cakephp; I have two combos, provinces and cities with cakephp.
I would like to change cities value when the province combo value changes. Here is my code
<div class="cities form">
<?php
$v = $ajax->remoteFunction(array('url' => '/cities/','update' => 'divcity'));
print $form-> input('Province.province_id...