Print the data from the two select tables

0

I have the code below that was to print on the screen the data of the two select tables, but it is only printing the name.

Follow the code:

<?php
require 'conexao.php';

ob_start();
error_reporting(E_ALL);
ini_set('display_errors','On');

require_once('firephp-core-0.4.0/lib/FirePHPCore/FirePHP.class.PHP');
$firephp = FirePHP::getInstance(true);
$firephp ->info("Debugando");

$firephp ->info($_POST, '\$_POST');

$Nome = $_POST['Data']['Consulta']['nome'];
$firephp ->info($Nome, 'Nome');

if (($Nome == null) || ($Nome = '')){
    $retorno = array('codigo' => "0", 'mensagem' => 'Preencha seu e-mail!');
    echo json_encode($retorno);
    exit();
}else{
    $conexao = conexao::getInstance();

    $sql = 'SELECT pessoa.*, contato.* FROM pessoas_inter AS pessoa inner join contatos_inter as contato on(contato.id_contato=pessoa.id_contato) where nome LIKE :nome';     
    $stm = $conexao->prepare($sql);
    $stm->bindValue(':nome', '%'.$Nome.'%');
    $stm->execute();
    $clientes = $stm->fetchAll(PDO::FETCH_OBJ);

    $firephp ->info($clientes, '\$clientes');        
    echo json_encode($clientes);
};
    
asked by anonymous 10.04.2017 / 15:34

0 answers