TapQuo/Lungo.js — Issue #19: Problem with select (websql)
Author: Klian
Created: 2011-11-18 08:46:01+00:00
State: open

Hi,

Im playing with WebSQL features and I have a problem, I cannot get the results...

This is my code:

```javascript
var selectTask = function(data){

var datos = [];

lng.Data.Sql.select('tasks', {done: 0}, function(result){

for (var i=0; i < result.length; i++) {
datos.push({
id: result[i].id,
name: result[i].name,
description: result[i].description
});
}

lng.Core.log(1, "Antes: " + datos.length);

});

lng.Core.log(1, "Despues: " + datos.length);

return datos;
};
```

All I get is:
Antes: 2
Despues: 0

Any idea ?

Thanks!