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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:42:12+00:00 2026-05-22T01:42:12+00:00

$query_message23 = select * from messages_system as m, members as me where m.mes_id=’$messageId’ AND

  • 0
$query_message23 = "select * from messages_system as m, members as me where m.mes_id='$messageId' AND m.frm_id=me.mem_id";

it gives output

Array ( [mes_id] => 826 [mem_id] => 334 [frm_id] => 334 [subject] => Re: Re: Re: Re: Re: Hola! [body] => i dno i just made it up lollllllllllllllllllll

Artin wrote:

Haha.. Dooskie??? Is that Russian? lol

aurita wrote:

PFFFFFFT!!!!!!!!!!!
YOU KNOW HOW I DOOSKIE! LMAO!

you can see that mem_id and frm_id are the same. How? I am confused. When i run this query in phpmyadmin i get mem_id 48 and frm_id 334 from messages_system and from members table (as i joined 2 tables) mem_id 334, so i think this members mem_id is overriding on messages_system mem_id.

Please suggest.

Thanks

  • 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-22T01:42:12+00:00Added an answer on May 22, 2026 at 1:42 am

    If you’re joining tables and there’s two or more duplicate field names in those joined tables, you should use an alias to distinguish them

    SELECT table1.mem_id AS mem_id1, table2.mem_id AS mem_id2
    FROM ...
    

    which gives you mem_id1 and mem_id2 in your fetched array.

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

Sidebar

Related Questions

Query: SELECT DISTINCT ([Equipment List].ID) AS Expr1, [Job Assignments].Job FROM [Equipment List] LEFT JOIN
this is the query: SELECT DISTINCT pprom.pk FROM ( SELECT item_t0.SourcePK as pk FROM
I try this query from Oracle : select * from a_table@Postgres; Here is the
my query is : var ReadAndUnreadMessages = (from m in MDB.Messages orderby m.Date descending
I have this CAML: query.Query = @<Where><Eq><FieldRef Name='MessageID' /><Value Type='Text'></Value></Eq></Where>; This checks if the
Query gives me some error: Msg 156, Level 15, State 1, Line 4 Incorrect
Query query = getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery( select proj_employee.employee_no as employeeNo, ... .setResultTransformer(Transformers.aliasToBean(User.class)); Inside User.class does the
This query works great: var pageObject = (from op in db.ObjectPermissions join pg in
TLDR; How do I read data from a table using Entity Framework, when the
I was trying to delete a record from a table in AS/400 database. I

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.