Postgresql aggregate array

Use array_agg: http://www.sqlfiddle.com/#!1/5099e/1 SELECT s.name, array_agg(g.Mark) as marks FROM student s LEFT JOIN Grade g ON g.Student_id = s.Id GROUP BY s.Id By the way, if you are using Postgres 9.1, you don’t need to repeat the columns on SELECT to GROUP BY, e.g. you don’t need to repeat the student name on GROUP BY. … Read more

Execute AsyncTask several times

AsyncTask instances can only be used one time. Instead, just call your task like new MyAsyncTask().execute(“”); From the AsyncTask API docs: Threading rules There are a few threading rules that must be followed for this class to work properly: The task instance must be created on the UI thread. execute(Params…) must be invoked on the … Read more

How can javascript upload a blob?

You can use the FormData API. If you’re using jquery.ajax, you need to set processData: false and contentType: false. var fd = new FormData(); fd.append(‘fname’, ‘test.wav’); fd.append(‘data’, soundBlob); $.ajax({ type: ‘POST’, url: ‘/upload.php’, data: fd, processData: false, contentType: false }).done(function(data) { console.log(data); });

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)