All Questions

RSS

2 answers

-1 votes

Asked by afixisitansu, 1 week, 1 day ago in Models

inserting span tag inside a link

can any body say what is the equivalent code for the following in cake php style.

"<a class="x" href="some url">Content"

1 answer

0 votes

Asked by emptywalls, 1 week, 1 day ago in Models

Containable and Calculated Fields

I've got my Song model and a Rating model associated with it. I'm trying to get the average rating of each song.

$this-Song-find('all',

array(

'contain' = array(

'Rating' = array(

'fields' = array('AVG(Rating.value)'),

)

)

)

);

This works for the first...

2 answers

0 votes

Asked by blacksymmetry, 1 week, 2 days ago in Controllers

How to use $pagination with has many?

Hello, i would like to ask, how can i use pagination with data, that are in relations? = not from single table?

I would like to get all records from ratings table, where user_id = $this-Auth-user('ID')

In user controller i have defined:


	var $uses...

2 answers

0 votes

Asked by Contemplate, 1 week, 2 days ago in Installation / Configuration

How do I tell CakePHP to parse CSS/JS files like .ctp?

There are a few problem with the default routing of pictures and the like.

1 answer

0 votes

Asked by cert138, 1 week, 2 days ago in Views

How to list multiple blog posts?

I want to list all the blog posts based on a user_id, which is a foreign key to the posts table. I've queried the posts that contain user_id = 1 and then in my view I setup a foreach like:

foreach ($posts as $post);

$post['Post']['content'];

My...

0 answers

0 votes

Asked by dimis283, 1 week, 2 days ago in Models

hasone problem

I ahve a table machine that has one service (the id id of service foreign key at machine).

So when I put at machine model the code nothing fetched but when I delete all machines are shown, what is wrong?

var $hasOne...

1 answer

0 votes

Asked by RMU, 1 week, 2 days ago in CakeQS

CakePHP version 2.0

I'm currently doing some testing with the CakePHP framework (version 1.3). There is also a CakePHP version 2.0 available i noticed. Can't find a lot of info about this version and its status. Can someone tell me when more about this 2.0 version?

3 answers

0 votes

Asked by sirDexter, 1 week, 2 days ago in Controllers

How to change id to name in url

Hello

I have the following problem.

We have three people eg.

id name

1 nowak

2 kowalski

3 smith

when I want to display for example kowalski i use

mysite/people/view/2

and i want to...

2 answers

0 votes

Asked by Ponch316, 1 week, 2 days ago in Helpers

How to make Paginator sort Strings as Ints

Hello,

I have a list of basketball players, whose numbers go from '00' to '99'. For this reason, I'm saving them as varchar on my database.

When I try to sort by Player.number, MySQL obviously sorts as varchar (1, 11, 12, 2, 20, ...).

Is there a way...

1 answer

0 votes

Asked by jravenscroft, 1 week, 2 days ago in Controllers

Advanced Routing

Hi,

I have a table of organisations and I would like to route traffic using organisation names. For example, if I had the following data in my organisations table:


ID | Name
1    Organisation A
3    Organisation B
4    Organisation C

What I would...

3   4   5   6   7   8   9   10   11

How does CakePHP Questions work?

CakePHP Questions is easy to use: Register and login or directly login using OpenID and just ask your question!

After you ask your question you just need to wait until you have got some answers and pick the correct answer.

Other users might help you by finding the right answer by voting and giving comments.