{"action":"opened","issue":{"url":"https://api.github.com/repos/nodeschool/discussions/issues/1628","repository_url":"https://api.github.com/repos/nodeschool/discussions","labels_url":"https://api.github.com/repos/nodeschool/discussions/issues/1628/labels{/name}","comments_url":"https://api.github.com/repos/nodeschool/discussions/issues/1628/comments","events_url":"https://api.github.com/repos/nodeschool/discussions/issues/1628/events","html_url":"https://github.com/nodeschool/discussions/issues/1628","id":131443283,"number":1628,"title":"ive been trying to get a function to return a string in nodejs but .... ","user":{"login":"ibnibraahim","id":8137536,"avatar_url":"https://avatars.githubusercontent.com/u/8137536?v=3","gravatar_id":"","url":"https://api.github.com/users/ibnibraahim","html_url":"https://github.com/ibnibraahim","followers_url":"https://api.github.com/users/ibnibraahim/followers","following_url":"https://api.github.com/users/ibnibraahim/following{/other_user}","gists_url":"https://api.github.com/users/ibnibraahim/gists{/gist_id}","starred_url":"https://api.github.com/users/ibnibraahim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibnibraahim/subscriptions","organizations_url":"https://api.github.com/users/ibnibraahim/orgs","repos_url":"https://api.github.com/users/ibnibraahim/repos","events_url":"https://api.github.com/users/ibnibraahim/events{/privacy}","received_events_url":"https://api.github.com/users/ibnibraahim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-04T18:57:42Z","updated_at":"2016-02-04T18:57:42Z","closed_at":null,"body":"i have been trying to solve this issue in node for hours \r\nnot getting my value returned, \r\nany help appreciated \r\nthank s\r\n```\r\n\r\n     function get_details(d_for) {\r\n\r\n        var lab;\r\n        db.query('select \"res_partner\".name,\"account_invoice\".amount_total,\"account_invoice\".date_due,\"account_invoice\".number,\"res_partner\".id , amount_total from account_invoice INNER JOIN \"res_partner\" On \"account_invoice\".partner_id =\"res_partner\".id WHERE ((\"account_invoice\".\"state\" = \\'open\\') AND (\"account_invoice\".\"type\" = \\'out_invoice\\') AND (\"account_invoice\".date_due < (CURRENT_DATE)) AND \"res_partner\".id = \\'' + d_for + '\\' ) ').then(function (detail) {\r\n\r\n            for (var i = 0, len = detail.length; i < len; i++) {\r\n                var row = detail[i];\r\n\r\n                lab = lab + dateFormat(row.date_due, \"mmmm dS, yyyy,\", false) + \"_\\n\";\r\n\r\n            }\r\n        });\r\n        return lab;\r\n    };\r\n\r\n\r\n```"}}