I am using a php web service to return SQL queries results to android in a JSON object format. It works fine for me but now I want to be able to return the result of a Joint query in a JSON Object, and I don't know how to do it. how would be able to put all the result in a JSON object and how do I access the result if I select data from two tables via a INNER JOIN?
EDIT : HERE IS THE QUERY
$query = " SELECT * FROM question INNER JOIN comment ON question.id = comment.id_question WHERE question.id = :id
";
WHy question is : this does return all I need and I encode it using json_encode. But when I receive it on my Android side, how to I access columns from table question or from table comment knowing that all I have is one json Object, let's said called "json".