Jump to content

Inner Join Problem


ballouta

Recommended Posts

Hello

 

I have the table 'members' of the following headers:

 

ID    user              password      reseller

2      malek            123              Y

3      maher            456              N

 

etc...

 

and the table 'rescus' with the following headers:

 

ID      customer      reseller    credits

6        malek          XXX        50

100    Samer        XXX        6

 

i wanna loop and print all members ='Y' and their credits frm the second table, i wrote this query but it is not giving me a correct result:

<?php
$query = "SELECT members.user, rescus.customer, rescus.credits
FROM rescus INNER JOIN members ON rescus.customer = members.user where members.reseller ='Y'";
?>

Please Help

Thank You

Link to comment
https://forums.phpfreaks.com/topic/126526-inner-join-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.