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

  • Home
  • SEARCH
  • 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 6816475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:55:49+00:00 2026-05-26T20:55:49+00:00

Hi everyone I’m getting pissed off with a seemingly easy table join, but I

  • 0

Hi everyone I’m getting pissed off with a seemingly easy table join, but I can’t tell what is going wrong since I don’t know what the query is. Is there a way to debug Active Records? I found one here, but how do I get access to the connection object?

The real issue is I’m trying to pull up all projects that a user is associated with (relation ship is in a joiner table)

projects table -> user_projects table -> users table

Project::find('all', array(
    'select' => 'user_projects.id, title, description, last_update',
    'conditions' => array('user_projects.user_id = ?', $user_id),
    'joins' => 'LEFT JOIN user_projects ON projects.id = user_project.project_id'
));
  • 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-26T20:55:50+00:00Added an answer on May 26, 2026 at 8:55 pm

    Well I discovered the answer to my own issue somehow, to get the last query:

    Model::connection()->last_query

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

Sidebar

Related Questions

Everyone, I have really tried, but I can't find out how to upload photos
Everyone (at least everyone who uses a compiled language) has faced compilation errors but
everyone. I know this is a far treated subject, but I've looked everywhere and
everyone..i want after i type 0203-ED in textfield ...two character behind that text can
Everyone who's done any web application development in Scala knows that you can use
Everyone knows public class Test<T> where T : SomeBaseClass But is there a way
everyone. Can someone share some links on articles about back end caching and fragment
Everyone knows and love String.IsNullOrEmpty(yourString) method. I was wondering if it's going to confuse
everyone.I wanna include javascript in the html(webpy templates),but it doesn't work.the javascript code in
everyone. I have problem replacing existing rows in table with new ones. I use

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.