Solved

find list cakephp

Posted on 2014-07-20
6
329 Views
Last Modified: 2014-07-26
HI,

In cakephp when I 'find all' I get all the required data and associated models as expected.
However with a find list I dont get the associated array value of tutoringtype which  appears in a find all.

Lesson  related to student related to tutoringtype

With the below code find list I get cant find tutoringtype col error.
The docs are not clear on this
http://book.cakephp.org/2.0/en/models/retrieving-your-data.html

 
//i have tried different recursive  values
$students = $this->Lesson->Student->find('list', array('conditions' =>
                    array(
                       'TutoringType.value' => 'Individual Tuition',
                        'recursive' => 2 
                        )));
		
		
                $students2 = $this->Lesson->Student->find('all');
                debug($students);
            

Open in new window

0
Comment
Question by:jagguy
  • 3
  • 2
6 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 40207717
Why is this posted in CSS?  There is no part of it even remotely related to  CSS.

Cd&
0
 

Author Comment

by:jagguy
ID: 40208023
? remove it from css as it was a mistake?
do you have an answer?
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 40208234
Have you linked models as per this associations rules? http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html

can you share those associations?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Accepted Solution

by:
jagguy earned 0 total points
ID: 40208650
I rebooted the server and the code now works so I didnt make a mistake
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 40208745
That's fine. All the best!
0
 

Author Closing Comment

by:jagguy
ID: 40221103
I found the answer
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now