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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:02:29+00:00 2026-06-15T11:02:29+00:00

I normally do a join like this: $query = SELECT table1.ColA, table2.ColC . FROM

  • 0

I normally do a join like this:

$query = "SELECT table1.ColA, table2.ColC ".
     "FROM table1, table2".
        "WHERE table1.uid = table2.uid";

But in this case the WHERE portion is already used to specify a record using a PHP variable. How do I JOIN table 2 in this case?

SELECT SQL_CALC_FOUND_ROWS ColA, ColB FROM Table1 WHERE value = $value
  • 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-15T11:02:30+00:00Added an answer on June 15, 2026 at 11:02 am

    Please try this

    $query = "SELECT table1.ColA, table2.ColC FROM table1, 
                table2 WHERE table1.uid = table2.uid and table1.value=$value";
    

    OR

    $query = "SELECT table1.ColA, table2.ColC FROM table1 INNER JOIN table2 
                   ON (table1.uid = table2.uid) WHERE table1.value=$value";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Normally the XML files I have to parse are like this: <row id=1> <title>widget<title>
SELECT * from `employees` a LEFT JOIN (SELECT phone1 p1, count(*) c, FROM `employees`
This seems like a really simple question; but I can't see how it's actually
I have two tables like this: [tblFacilityHrs] id uid title description [tblFacilityHrsDateTimes] owner_uid startEventDate
Okay I always have questioned this, but never really needed it until today. Normally,
Suppose I have a table1 like this: id | itemcode ------------- 1 | c1
Normally when I want to change the connection for a Query Editor Window in
Normally, if I want to start a new activity I can use StartActivity(typeof(foo)); This
I seem to be a bit stuck on this, but my experience in Linq
I'll use a concrete, but hypothetical, example. Each Order normally has only one line

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.