I created a small php script that returns a mysql result depending on given post/get parameters. With this file I can now use the jquery.post or .get command to retrieve something from my database.The script always returns 1 value. So I tried to make a javascript function that returns the retrieved value from the database.This is what I WANT it to do but I does not work like it should:\[code\]function mysql(args) { $.post("scripts/ajax_mysql.php",args,function(data) { return data; });}var value=http://stackoverflow.com/questions/2033538/mysql({ table:"user", where:"nickname='test'", get:"email" });\[/code\]It seems the data is retrieved when the function has already been passed. Is there a workaround for this?