I made a PHP script:
function getData(){ $DBH = connectDB(********); $STH = $DBH->query('SELECT * FROM table'); $tData = $STH->fetchAll(PDO::FETCH_ASSOC); echo json_encode($tData); }
This is executed in getData.php. The fields are ID, name, lastname, age. Basically, get's all the table's values and put them in a JSON array.
I dont know how to complete the JQuery's getJSON function to retrieve, for example, the ID 5 register or the name = "John" one.
The examples at JQuery.com are a bit complex due my little understanding of how all this stuff works.