Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4381180
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:37:02+00:00 2026-05-21T12:37:02+00:00

Running into another issue that I just seem cant to find any information what

  • 0

Running into another issue that I just seem cant to find any information what could be causing.

I am declaring variable $makes and inside the view its not finding it.

here is my current code:

function makemodel($id = null) {
    $this->Make->id = $id;

    $makes = $this->Make->find('all', array(
        'conditions' => array('id' => $id),
        'contain' => array('Makemodel' => array('Road'))
        )
    );
}

}
?>

I have also tried this: $this->set->(‘makes’,$this->Make->find(script here));

Any advice would be appreciated thanks!

Are there any reference material other than cakePHP’s book?

Array
(
[0] => Array
(
[Make] => Array
(
[id] => 1
[url_make] => subaru
[MakeName] => Subaru
[MakeOrigin] => Japan
[Summary] =>

            )

        [Makemodel] => Array
            (
                [0] => Array
                    (
                        [id] => 1
                        [ModelName] => Impreza WRX
                        [make_id] => 1
                        [Road] => Array
                            (
                                [0] => Array
                                    (
                                        [id] => 3
                                        [makemodel_id] => 1
                                        [RoadTypeID] => 1
                                        [name] => Dirt
                                    )

                                [1] => Array
                                    (
                                        [id] => 4
                                        [makemodel_id] => 1
                                        [RoadTypeID] => 2
                                        [name] => Snow
                                    )

                            )

                    )

            )

    )

)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T12:37:03+00:00Added an answer on May 21, 2026 at 12:37 pm

    Assuming that the find call is working correctly, you have to pass the data from your controller to your view using the set() method.

        function makemodel($id = null) {
        $this->Make->id = $id;
    
        $makes = $this->Make->find('all', array(
            'conditions' => array('id' => $id),
            'contain' => array('Makemodel' => array('Road'))
            )
        );
        $this->set(compact('makes'));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running into an issue with IE8 developer tools where they Style information is
I'm running into a bit of an issue. My software needs to know when
So i am running into a major issue. I am currently trying to use
I was running into the following issue: // $data contains some image data $gm
I'm running into an issue upgrading a project to .Net 4.0...and having trouble finding
I'm running into this problem often: I'm creating a function that needs to perform
Alright, so I'm running into an issue with my code. What I have done
I just got the latest Xcode 4.2 and I am running into problems with
I'm running into an issue with the random number generator I wrote for a
I'm running into kind of a weird issue. I am making a shared memory

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.