Get all the INNER JOIN data

3

My problem is that I'm making a query but I'm not able to list all the data in the table.

SELECT * FROM suporte s
INNER JOIN login l ON l.cliente_id = s.cliente_id
INNER JOIN radius_acct r ON r.USERNAME = l.user
WHERE s.CLOSEDATA = '0000-00-00 00:00:00' AND r.ACCTSTOPTIME = '00-00-0000 00:00:00' limit 50;

When I put <td ><?php echo $linha['opendata']; ?></td> it works normally, but the data to the right in the query is not displayed. Ex: <td class="cliente1"><?php echo $linha['acctstarttime']; ?></td> returns me

  

Notice: Undefined index: acctstarttime in D: \ www \ test \ index.php on   line 76.

Does anyone know what might be causing this problem?

    
asked by anonymous 24.12.2016 / 19:14

1 answer

0

Try this,

SELECT suporte.*, login.*, radius_acct.* FROM suporte
INNER JOIN login ON login.cliente_id = suporte.cliente_id
INNER JOIN radius_acct ON radius_acct.USERNAME = login.user
WHERE suporte.CLOSEDATA = '0000-00-00 00:00:00' AND radius_acct.ACCTSTOPTIME = '00-00-0000 00:00:00' limit 50;

In this way we are selecting everything from the three tables

    
24.12.2016 / 19:25