I want to have a simple function where i can insert a sqlQuery and get a database answer in json-format like this:
function ExecuteQuery(query){
$.post("sql.php", { "query": query },
function(data){ return data; },
"json");
}
The response i get is undefined, I think i have misunderstood something quite basic but i don't know what, can anybody give me a hint?