$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
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
which gives you
mem_id1andmem_id2in your fetched array.