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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:25:55+00:00 2026-06-09T02:25:55+00:00

its me with another trouble! Table1 n: 1 n: 2 n: 3 Table2 n:

  • 0

its me with another trouble!

Table1

  • n: 1
  • n: 2
  • n: 3

Table2

  • n: 1
  • n: 3

Query1

  • numeber of results: 3

Query2

  • numeber of results: 2

I need to compare this tables and if Table1 == Table2 echo “found”. So i made 2 diferent querys and Im doing it like this:

while($row1 = mysql_fetch_array($Query1))
{
while($row2 = mysql_fetch_array($Query2))
{
if($row1['n'] == $row2['n'] )
{
echo 'found';
}
}
}

Kinda dumb? :\ cause it seems show just the 1st result and stop.

Thanks

EDIT

Exmpl: I got this table: clients, and table: VIP clients. I need to search on table VIP clients if there is any client with same id, and result an echo: “found it”

  • 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-09T02:25:56+00:00Added an answer on June 9, 2026 at 2:25 am

    Not sure if this is what you want, but you could do it in one query to see if there is any matching records in vipclients.

    select a.*,b.* ,CASE WHEN b.clientid IS NOT NULL 
           THEN 'FOUND'
           ELSE 'NOT FOUND'
    END AS vipexists 
    from clients a left outer join vipclients b on a.clientid=b.clientid
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 tables with some columns and another table that I want its
I have this procedure that executes another procedure passed by a parameter and its
OK, this is Another Project Im Working ON. Its a Chat Client. and Using
i have trouble with calling method from another class this is my code this
I need to implement yet another database website. Let's say roughly 5 tables, 25
OK -this might be simple but i'm having trouble visualising where i need to
I'm working on a trigger which needs to re-insert its data on another table.
In my system I have two different projects, one defining its interfaces and another
In another discussion , someone say something about run the java code on its
I want to check a Column value when update.If its match insert into another

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.