I need to build a filter search that returns data using the criteria set.
My problem is building the search. It needs to be a OR query because anyone of them could be selected.
http://img200.imageshack.us/img200/2527/screenshot20100118at095.png
This is what will be searched.
Accommodation.space
Accommodation.room_type
Accommodation.fa...
I'm using the Containable behavior to get a list of Comments (belongsTo Post, which belongs to Question; Question hasMany Post, and Post hasMany Comments; all of these belong to Users).
$data = $this->Question->find ( 'first',
array ('contain' =>
array ('User',
'Post' => array ('User', /* 'order' => 'User.c...
Hi there.
I have this table in my DB:
Group
- ID-Name
- 1 -abc
- 2 -def
- 3 -ghi
Pages
- id-group_id-name
- 1 -1 -home
- 2 -1 -about us
Now I wanted to make a select box that groups them by 'group' using:
function add() {
$this->set('pages', $this->Page->find('list', array('fields' => array('Page.id', 'Page.na...
I got app that need to be recoded in CakePHP.
I got following select with subselects:
SELECT COUNT(*) AS item1,
(SELECT COUNT(*) FROM portal_members) AS item3,
(SELECT COUNT(*) FROM portal_reviews) AS item3,
(SELECT COUNT(*) FROM portal_downloads) AS item4
FROM portal_articles
...
I want to ovveride the default url() validation method in CakePHP, since it does not allow the use of ~ inside urls. I thought it would be enough to declare a url() method in AppModel, but it seems that core methods have the precedence with respect to user defined ones.
I think (but I have not tried) one possible way would be to use
$v...
I'm planning on using caching in CakePHP. I'm wondering what happens if I updated the data on my tables, will CakePHP re-cache my data?
Thanks in advance!
...
This is a rather obscure question so please bare with me. It's more about approach than syntax.
I have a MySQL table filled with 'notifications' (id,user_id,date,etc). I have to send an alert (via email, facebook, twitter, whatever... not the issue) when each of those entries pings as 'true'. Here's the thing, how should I go about ping...
I am a Cakephp developer that is currently doing some work in ruby on rails and one thing i use a lot in cakephp is debug-kit which allows me to see many things within the web page such as request information and variables available in the view.
Is anything like this available for rails as i cant seem to find something similar.
...
I have a set of rather static pages wich I moved to the views/pages folder. The resulting *.ctp files are editable by my customer through CushyCMS (simplistic cms perfect for dummy proof editing). However CushyCMS generated preview links that obviously don't take CakePHP into account. I would like to solve this little problem with custom...
Hi,
We've created the email validation part of our site. We built the site using CakePHP BTW.
The problem is that it doesn't work when we click on the link in the email. The email is sent as plain text.
A weird thing is that when we paste the link on the address bar, it works. Also when clicking on the link using Gmail and desktop em...
I baked new app in cake1.3 and I've noticed new 'libs' directory in app root. What is it purpose and/or when should I use it?
...
I am using Cakephp to perform a search through sphinx. I wanted to do modify the default structre of pagination links generated by cakephp
For example
From:
localhost/search/page:1/key1:google/key2:code
To:
localhost/search/key1:google/key2:code/page:1
I want the page number to appear at the end. Is there a way this can be do...
I am using CakePHP with Apache2. Analyzing my pages with the tool PageSpeed from Google, I find two main problems. The first is that I should enable gzipping of content, the second that I should leverage browser caching for images, javascript and css files.
I have more or less found how to remedy this, but it involves changing my main ....
Howdy!
I got layout, nothing special, three columns, just to learn CakePHP. In documentation I found nothing about this case.
I got some statistics in sidebars, si I send them to layout file (default.ctp) cause they are displayed on every page.
I build (thanks to one user here) a component:
class SidebarComponent extends object {
...
I'm baffled by this one... I'm doing a remote widgety type of setup, we'll control both domains so security is not a concern. I'm using jsonp to allow cross domain ajax requests.
The visited site is domain1.com, which inclues:
<script src="domain2.com/file.js"></script>
file.js uses jQuery to make ajax requests:
$.ajax({
url: 'ht...
I am developing an application that is, to put it simply, a niche based search engine. Within the application I have include a function crawl() which crawls a website and then uses the collectData() function to store the correct data from the site in the "products" table as described in the function. The visited pages are stored in a dat...
I was trying develop a website with Cakephp and Joomla... But lately I've been founding a lot of barriers that create difficulties implementing things that would have been a lot easier if I only developped using one of the components.
So, in your point of view (as someone with more experience than me), is it worth to integrate CakePhp w...
I tried to upload my app to webserver to check it's performance, but unfortunately I got weird error:
Error: Database table news for model
News was not found.
The Most funny things are:
- In Model file I got var $useTable = 'other table name';
- This table exist, connection with DB too!
- on my local server everythings works gre...
Hi,
I got few models with custom queries, just don't wanna fight with them so I used $this->query method to query DB.
Now got question...
The only way I can access data is using $model[0][0]['field'], is there any other way to display them in foreach loop?
Cheers!
...
How to check an Ajax request in cakephp?
...