I have a few tables with the following relationships:
Company hasMany Jobs, Employees, and Trucks, Users
I've got all my foreign keys set up properly, along with the tables' Models, Controllers, and Views.
Originally, the Jobs table had a boolean field called "assigned". The following find operation (from the JobsController) successf...
Hi all,
When I was doing some self-learning on JQuery Ajax in Cakephp,
I found out some strange behaviour in the JQuery Alert Box.
Here are a few lines of code of the JQuery Ajax I used:
$(document).ready(function(){
$(document).change(function(){
var usr = $("#data\\[User\\]\\[name\\]").val();
$.p...
Hi all,
I was doing some self-learning on how to pass data from JQuery Ajax to a particular URL in CakePHP:
I have tested three sets of codes that the first one was working well, but the rest failed to work, which makes me so confused.
Could some experts here tell why the second and the third sets of codes failed to pass any data?
Set...
Hi, when using scaffolding on a controller the views render fine and the app even attempts to insert the data; the problem is that the scaffold is completely ignoring the relations I'm defining in my model class, in fact it's ignoring the class entirely as I can delete the file and the controller still scaffolds and render the crud from ...
Hi everyone,
I have just updated my cakephp library to latest version 1.3.1. Before this I was running v1.3.0 with no errors.
After running the application I am given this error message.
unserialize() [function.unserialize]: Error at offset 0 of 2574 bytes [CORE\cake\libs\cache\file.php, line 176]
I updated the libraries simply by r...
In a simple CakePHP model where User hasMany Item (and Item belongsTo User)-
Suppose 50 users, have each 10 items.
How can I find() only 5 users, each with the latest 5 items he has?
When I impose a limit in the find, it only limits the number of users, not the number of associated Items.
Thanks!
...
I can’t get the css, js and img loaded.
I’ve been using the web.config out of this article:
http://book.cakephp.org/view/1533/A-Note-on-mod_rewrite Please any suggestions…
...
I'm trying to make a blogging system but obviously certain users in certain groups should only be able to edit/delete their own posts/comments. How would I go about doing this in CakePHP? I followed the manual's basic Acl guide to setup my current Auth system.
...
Hi!
I´m trying to write a log system for my CakePHP intranet. What i need is to store de username/datetime whene someone tryes to login.
My login code is on the clients_controller and i need to store the data on a model called log (i have the model, controller, view... but they are not related)
how can i achive that?
thank you
...
How can I extract strings defined in the CakePHP core (like the auth component messages) with the cake i18n console?
I tried to run cake i18n extract with both the path to the app folder and the cake folder but this did not give me the cake core strings in the .pot file.
...
The CakePHP ROOT constant, where should it point to?
...
Hi ,
i am working on cakephp.
I have developed an application where i have used localhost in all ajax post and get..
like
var ht = $.ajax({
type: "GET",
url: "http://localhost/FormBuilder/index.php/forms/getInvitees/<?php echo $emailid;?>",
...
Hi all,
In a controller, I got two functions that one is made to be private:
function toavail(){
$this->autoRender=false;
$result2=$this->__avail();
if($result2==0){return "OK";}
else{return 0;}
...
Hi ,
i am working on cakephp. i have my app in my localhost.. And if i try to run my app in other machine , i need to do set base path ...
how to do this so ??
Please give some suggestions of how to do this??
Thank you
...
Hi!
I'm using CakePHP. When trying to insert a null value into a field it turns into 1900-01-01 00:00:00.
Here's a sample of my code:
$this->save(array(
'date_signed' => null
));
What seems to be the error and how do I fix it? Thanks in advance!
...
Can anyone tell me how to pass parameters to a function in another controller in cakephp?
...
Im developing an form in cakePHP where i want to set two forms next to eachother.
Im creating it using this code.
echo $form->input('timeback', array('options' => array('week',1,2,3,)));
This creates a dropdown. Followed by this code:
echo $form->end('submit');
This all works well, accept that these two forms should be next to eachot...
Hello everyone,
I've come across an extremely unusual bug that my team has literally no idea how to solve. Doing some research, I found some similar solutions that I thought would work, but alas did not.
Here is my situation, let me know if I can provide additional insight to help solve the problem.
The first step is that someone choos...
I wrote a shell method in CakePHP 1.3 that has a return value.
I'd like to be able to access that method from within a controller, so that I can pass its return value into the View.
I'm not sure how to access those methods appropriately from within the controller. Have I done it wrong?
I could easily duplicate the code, but I'd lik...
Hi All:
I have an issue with not getting the correct relative url.
Right now, say my home page is at (please ignore quotation)
"http://www.foo.com/user/home"
I have links on the homepage that should go to
"http://www.foo.com/user/home/page1"
but right now I'm getting
"http://www.foo.com/page1"
Everything worked locally, can t...