I have a datamodel, let's say: invoices (m:n) invoice_items
and currently I store the invoice total, calculated in PHP by totalling invoice_items, in a column in invoices. I don't like storing derived data as it paves the way for errors later.
How can I create a logical column in the invoices table in MySql? Is this something I would be...
am trying to run the remote function in the code below every 5 seconds, but it runs only once if i remove the frequency option. So i tried remoteTimer function, but when i use remoteTimer function, some code of the script goes outside the script tags and i see that in the webpage..
echo $ajax->form(array('type' => 'post', 'options' => a...
Hey,
I was just wondering how to decrypt/encrypt form data in cakephp by creating a behavior?
What I have so far:
$key = Configure::read('Security.cipherSeed'); Security::cipher($encrypt,$key)
debug($key);
function encrypt { var $autoEncrypt= 'true';}
function decrypt {}
Other than this I really could use some help.
...
I'm getting a return string from a merchant account that looks like:
RecurringID=8675309&RefNo=41:39&Notes=
so I parse it into an array like this:
$results = array();
$temp = explode('&', $temp);
foreach($temp as $line)
{
$line = explode('=', $line);
$results[trim($line[0])] = trim($line[1]);
}
The resulting print_r($result...
Hi
i have to call localhost cakephp made pages using jquery in my another cakephp folder page in div.please suggest any example so that it will be easy to do that.
thanks
...
I have created a custom page for error messages in my web application.
I have created these two files in the views/errors/ directory named 'missing_action.ctp' and 'missing_controller.ctp'.
On server the error message is shown as follows:
and on localhost the error is shown properly like as follows:
I want to show the error messag...
Hi everybody! I'm new to php and have zero exprience with the cake-php. I created the php web services, which reads data from MySql and return to my iphone app. Previously I used the same code successfully in many app, But now I'm facing the problems in it. Because the web server on which I installed my web services is cake-php based. wh...
When i try to a edit a entry.. its creating a duplicate entry in the database.
i have made sure i add an hidden id field when i go to the edit form.
Restaurant
RestaurantAttribute
RestaurantContact
these are the models i am using.
tried reinitialize the id
$this->Restaurant->id = $this->Restaurant->id;
strange... in the db the ex...
hi all,
i'm developing cakephp application.
i need some specific characters in url, like & (ampersand), because i need it for search purpose.
but, if i have ampersand in my url (like http://localhost/myapp/publications/index/string:Mono%20Manana/tags:publisher), it is rewrited and redirected as default url (in this case http://localho...
I'm trying to upload a file to my server using the CakePHP file upload form helper.
I am currently running CakePHP 1.3 on my development computer (Mac OSX).
When the form submits, it has in the variables that are passed to the controller its temp name: /var/tmp/name and then its name as the name of the file.
However, when I try to rename...
I'm trying to upload files into a folder, but it keeps failing and I think CakePHP is taking over the write and try to process it as a Controller.
Is this true? And if so, how can I sidestep it?
...
Hi
In my app I have 2 tables that have a many to many relationship. Let us say these are table students and table courses. Each course can have many students and each student can also enroll in many courses.
Now I want to create a associative table which according to cakephp should be named courses_students.
However for various reason...
Hello All,
I have one domain on godaddy (www.mydomain.com). I have placed my cakephp application on this domain. It is working fine for me.
But i have created a subdomain blog.mydomain.com for this godaddy has created a directory named blog inside the www.mydomain.com now how can i redirect the request coming for blog.mydomain.com to ...
Is there anyway to upload files to an ftp server using cakephp?
...
I would like to display a ticker on each page what scrolls some of the latest datas in it. I think to put in the layout file would be more simply if I can read the model data from the layout.
Is it possible?
Or does layout code has access to the variables generated by a controller and passed to a view?
Or is it the only way to make an ...
I am a 3+ years old in cakephp and facing a somewhat strange issue
with submitting a form to plugin controller's action (i am using
plugin first time). After trying different known things i am posting
this one.
Going straight into the matter here is the form in my "forum" plugin's search_controller.php's "index" view:
echo $form->creat...
I have an application the is loaded with forms in every view. I've become rather familiar with CakePHP's array syntax and I use the $this->data parameter a lot.
I fell in love with skinny controllers and fat models, so I put as much code in my models as is possible. Unless I'm doing something complex, most of my controller methods loo...
Hi all,
I am using cakePHP 1.26. I am sorry to ask this question, but I couldn't work out how to use the cakePHP built-in FORM helper to generate the code like these two:
<input type="text" name="data[Test][quote]" id="data[Test][quote]" size="12" style="font-family:Arial" value="helloworld" readonly>
<input type="hidden" name="data[...
Hi all,
I am using cakePHP and is making a very simple message board.
I came across a question, and I have no idea how to solve it:
Let say there were ten records in the Table Reply, and a user has just successfully made
a new reply to the Table. So there are eleven records now.
After the new record is made, I use this to redirect the ...
I am trying to use AJAX to populate some select boxes that were autogenerated using CakePHP's formHelper.
How do I add the onChange event listener to the select box?
...