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 8267129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:24:17+00:00 2026-06-08T05:24:17+00:00

Now, I have spaced the only right output I get, that number is a

  • 0

Now, I have spaced the only right output I get, that number is a step_id but then it does not give me all the over IDs. Like I said, I was hoping the debug would print/echo ALL step_ids on the screen when the user_id in my steps table, is the right type of id.

DEBUG OUTPUT BELOW:

app/controllers/steps_controller.php (line 109)

1323

Notice (8): Undefined offset: 1 [APP/controllers/steps_controller.php, line 109]app/controllers/steps_controller.php (line 109)

Notice (8): Undefined offset: 2 [APP/controllers/steps_controller.php, line 109]app/controllers/steps_controller.php (line 109)

Notice (8): Undefined offset: 3 [APP/controllers/steps_controller.php, line 109]app/controllers/steps_controller.php (line 109)

Notice (8): Undefined offset: 4 [APP/controllers/steps_controller.php, line 109]app/controllers/steps_controller.php (line 109)

Notice (8): Undefined offset: 5 [APP/controllers/steps_controller.php, line 109]app/controllers/steps_controller.php (line 109)

Notice (8): Undefined offset: 6 [APP/controllers/steps_controller.php, line 109]app/controllers/steps_controller.php (line 109)

Notice (8): Undefined offset: 7 [APP/controllers/steps_controller.php, line 109]app/controllers/steps_controller.php (line 109)

Notice (8): Undefined offset: 8 [APP/controllers/steps_controller.php, line 109]app/controllers/steps_controller.php (line 109)

UPDATE :

I am not sure if this was an error or not but in my foreach loop I had ‘Step.user_id’, when then find command is pointing to the Step table anyway, so I changed it! But It still does not work.

With, the new code below, more or less the same code it was. I have used a debug command to print ALL the step Ids when the user id in the steps table matches to the user id that are only of the right role, e.g. >3. However the debug only gives me one returned result! And then ‘Undefined offset:’ 1 to 8.

Any ideas of what I am doing wrong? Please??

        foreach($getUserIds as $k=>$data) {
            //$StepConditions = ;

            $getStepIds = $this->Step->find('all', array('conditions' => array('user_id' => $getUserIds[$k]['User']['id'])));

            debug($getStepIds[$k]['Step']['id']);

        }

I have searched on here but I can’t seem to find anyone who as posted about this problem, so I hope you can help!

Ok, the main aim of my function is to get all the ‘steps’ out of my database but only when the user_id is > 3.

I am very new the CakePHP, so I am not very good with these find commands let. Now, as it stands, If I debug $getSteps, it only gives me 0,1 & 2 numbered arrays. All the info in theme is right but I do know there is more than three steps done by the user group.

Then I debug, $getUserIds, it gives me all the user Ids I wanted but not all the steps done my all this users, just three I said.

Any hope is most welcome!

Many Thanks Glenn

function Breakdown($id = null) {
    $getUserIds = $this->Step->User->find(
        'all',
        array(
            'conditions' => array('role_id' => 2)
             )
        );

    foreach ($getUserIds as $k=>$data) {

        $getSteps = $this->Step->find(
                'all', 
                array(
                      'conditions' => array('Step.user_id' => $getUserIds[$k]['User']['id'])
                     ) 
        );
        debug($getSteps);

    }

die();
} //End of Breakdown() function
  • 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-06-08T05:24:20+00:00Added an answer on June 8, 2026 at 5:24 am

    Its OK,

    I have solved my problems! I think the users were assigned to each step but they are only assigned to the project, therefore it does not work.

    What I am going to do is make a new table and build my links to each step for each user.

    Many Many Thanks For All The Help and support you guys have given me on this!

    Glenn Curtis.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What I have right now is an animation that starts when I press space:
I now have a running Java program which only lacks of the final step,that
I have a problem that involves biology area. Right now I have 4 VERY
I know, I know, now I have two problems 'n all that, but regex
I have a working solution right now, but it seems really ugly for something
I now have a file uploader that goes on like this This is the
With help from you guys I now have a script that works like a
Good day! I right now have a function the drags an element from a
Right now I have a list activity powered by a cursor adapter. I have
I have a tough problem right now. I am having a big dictionary file

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.