I have started to look into CakePHP to increase my productivity. The problem is that I have run into a small problem, which has kept me occupied in more than one hour - when the form is submitted it is not validated.
Even though I intentionally leave both fields blank it still saves and gives the OK-message.
Hope somebody can help me g...
I have three tables : Units, Offers and Agents with following associations
Unit hasMany Offers
Offer belongsTo Agent
When I paginate Unit table I get all the units and all the corresponding Offers for each unit , but not the Agent that offer belongs to.
Ex:
Unit1
offer1
offer2
Unit2
offer1
offer2
offer3
...
And I want t...
I am using cakephp framework. I would like to retrieve the contents of the uploaded file and store it in the database. I want to be able to search the content of the uploaded file.
I was made aware that file_get_contents would work for plain .txt files. But all my documents are .docx and .pdfs. Is there any solution I could use.
I app...
Hi,
I'm using the searchable behaviour from the bakery.
It is all set up correctly with no errors, so there is no problem there. However when preforming a search it returns no results. I'm at a loss as to why this is happening because of a lack of any errors.
I think it might have something to do with initial set up or the indexing o...
Hi all,
I was doing some self-learning about cakephp (version 1.26).
I got a simple HTML input text field like this:
<input type="text" name="data[testing][name]" id="data[testing][name]">
The value from the Input text box field was checked against the database.
If the value matches the data stored in the database, it will return tru...
Hi all,
I am using cakePHP v1.26.
In the default.ctp file,
I got a single of this code in it:
$session->flash();
I came a corss a web site in which the author suggested using this instead:
if($session->check('Message.flash')){
$session->flash();
}
I do not understand what this line of code is doing:
if($session->check('Message....
I can't seem to figure this one out.
I have a validator-type script that validates certain files on my server (checks if exists, its contents, etc). I want it to run continuously with only one instance of it, not more. The current solution I have doesn't seem to work, I'm guessing due to timeouts (possibly other reasons too). For each f...
function new_photo()
{
if( !empty($this->data))
{
$this->data['Photo']['showcase_id'] = $this->Session->read('CurrShowcase.id');
$this->data['Photo']['added'] = date("Y-m-d H:i:s");
$this->Showcase->Photo->save...
Whenever I output an xml file, I always get 9 blank lines of whitespace at the top, anyone know what the problem is? I also get a timestamp at the end which I don't want:
<!-- 0.35s -->
Here's the error:
XML Parsing Error: XML or text declaration not at start of entity
Location: http://example.com/controller/get
Line Number 9, Column...
I have the following array:
Array
(
[0] => Array
(
[id] => 4
[rate] => 82.50
[pounds] => 2
[ounces] => 3
[mailtype] => Package
[country] => UNITED KINGDOM (GREAT BRITAIN)
[svccommitments] => 1 - 3 business days
[svcdescription] =>...
Hi...
I want to show checkbox selected in edit section if there have value in DB. i m using cakephp 1.3 version .in edit section how i will show valued checkbox true.
Please help me as soon as possible.
...
I'm working on an app that will have 6 ARO groups in order to cover the required permissions spectrum. It is really best practice to have *_add, *_edit, *_index, *_view, etc. methods for each? That seems like a bit of code overload and maintenance headache. The "cheapest" way I can imagine to handle it with routing is something like:
...
Hi ,
actually i have 1 query but i am unable to convert it into cakephp query format.
$result = "select * from esl_userresults,esl_lyrics where esl_userresults.esl_songID = esl_lyrics.id and esl_lyrics.song_name like '%".$esl_keyword."%'" ;
Please help
thanks
...
Hello friends,
How can i make a progress bar in cakephp?
and other related question is,
lets say, for a loop, how can I send output to the browser for every iteration..... in cakephp....
I tried using setflash function, but didnt worked for me....
My main intention in trying above things, is that I want to send some output to browser...
how to display multi table data in one page like facebook news feed.
example tables /event,task/
i want to sort by datetime new in top.i can do it by php.i need mysql way /Sorry for my english/
event.row1
task.row1
event.row2
task.row2
event.row3
task.row3
...
older
...
Hi , actually i have 1 query but i am unable to convert it into cakephp query format.
$result = "select * from esl_userresults,esl_lyrics where esl_userresults.esl_songID = esl_lyrics.id and esl_lyrics.song_name like '%".$esl_keyword."%'" ;
when i convert this query into cakephp it gives error like
esl_userresults.esl_songID unknown co...
hello friends,
On my cakephp based site, when i do multiple requests simultaneously, cakephp logs me out.
What happens exactly is,
I click on one of the link on my site, to open it in a new tab,
now, while the request is being processed, if i click another link on my site, cakephp takes me to the login page for this link...
What ca...
I'm just starting out with CakePHP. From what I've been reading, by following convention in your model files, it can figure out foreign keys for you. Does this mean that when I'm writing my SQL script to create tables in MySql I shouldn't specify relationships and just let Cake do this?
...
Hi,
I am developing an application in cakePHP which has two sets of methods :
1) Methods which are called from the mobile phone to process payments
2) Methods which handle the website logic.
Now, the problem is that both the methods handling the mobile calls and the website logic are present in the same controller. This has made my cod...
Sometime I will implement changes locally and they work fine, I copy them to my remote webserver and the changed are ignored. (The code is identical.)
I go into core.php, change debugging to 3, check again... it works!
I have a feeling it's something to do with cache but I don't know what exactly to change.
...