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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:00:53+00:00 2026-06-05T08:00:53+00:00

I am applying this query for below D6 query , not working ..dont know

  • 0

I am applying this query for below D6 query , not working ..dont know wat wrong i’m doing ….does innerjoin fails in some condition

$result = db_select('px_slides','s')
    ->join('node','n','s.vid = n.vid')
    ->fields('s',array('tissue_type','body_site'))
    ->fields('n',array('sticky','title'))
    ->condition('n.status','1','=')
    ->condition('s.cid','126','=')
    ->execute()->fetchObject();

drupal 6 query i have:

    $result = db_query('
  SELECT n.nid, n.vid, n.sticky, n.title, n.created, s.cid, s.ref_id, s.viewurl, s.specimen_type, s.tissue_type, s.body_site, s.test_type, s.algorithm, s.result 
  FROM {px_slides} s INNER JOIN {node} n ON n.vid = s.vid
  WHERE n.status = 1 ')->execute();
  • 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-05T08:00:54+00:00Added an answer on June 5, 2026 at 8:00 am

    You need to put your call to ->join() on a separate line altogether, as it doesn’t return the query object:

    $query = db_select('px_slides','s')  
      ->fields('s',array('tissue_type','body_site'))
      ->fields('n',array('sticky','title'))
      ->condition('n.status','1','=')
      ->condition('s.cid','126','=');
    
    $query->join('node','n','s.vid = n.vid');
    
    $result = $query->execute()->fetchObject();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just saw this term on a job I was applying for and I'm
I have a page, with ajax URL on it, ofcourse this page is applying
When applying the MVP pattern to ASP.NET applications, where does using AJAX to post
I am applying Animation Drawable with some smoke like animation. It works properly everywhere
I am applying join query to fetch data from database on my iPhone app.
I need to get the nid alone in this query. SELECT count(nid) as total,nid
I have a query that looks like this: select id , int1 , int2
This is the query that i'm trying to achieve via active record: UPDATE `Customer_donations`
I've seen a few different versions of this question but having difficulty applying it
I am creating an SP which gives some result by applying distinct on it,

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.