{"action":"created","issue":{"url":"https://api.github.com/repos/brodysoft/Cordova-SQLitePlugin/issues/220","labels_url":"https://api.github.com/repos/brodysoft/Cordova-SQLitePlugin/issues/220/labels{/name}","comments_url":"https://api.github.com/repos/brodysoft/Cordova-SQLitePlugin/issues/220/comments","events_url":"https://api.github.com/repos/brodysoft/Cordova-SQLitePlugin/issues/220/events","html_url":"https://github.com/brodysoft/Cordova-SQLitePlugin/issues/220","id":63424902,"number":220,"title":"SQLite PLugin Error: no such function: if (code 1)","user":{"login":"rinnungirenthlei","id":10258612,"avatar_url":"https://avatars.githubusercontent.com/u/10258612?v=3","gravatar_id":"","url":"https://api.github.com/users/rinnungirenthlei","html_url":"https://github.com/rinnungirenthlei","followers_url":"https://api.github.com/users/rinnungirenthlei/followers","following_url":"https://api.github.com/users/rinnungirenthlei/following{/other_user}","gists_url":"https://api.github.com/users/rinnungirenthlei/gists{/gist_id}","starred_url":"https://api.github.com/users/rinnungirenthlei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rinnungirenthlei/subscriptions","organizations_url":"https://api.github.com/users/rinnungirenthlei/orgs","repos_url":"https://api.github.com/users/rinnungirenthlei/repos","events_url":"https://api.github.com/users/rinnungirenthlei/events{/privacy}","received_events_url":"https://api.github.com/users/rinnungirenthlei/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brodysoft/Cordova-SQLitePlugin/labels/invalid","name":"invalid","color":"e6e6e6"},{"url":"https://api.github.com/repos/brodysoft/Cordova-SQLitePlugin/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-21T16:29:15Z","updated_at":"2015-03-21T17:28:21Z","closed_at":"2015-03-21T16:42:46Z","body":"Hi Brodybits,\r\nI want to use this query with SQLite for my chat section :\r\nselect PreQuery.*, m2.message, m2.ufrom, m2.uto from ( SELECT  if( m.ufrom < m.uto, m.ufrom, m.uto ) as Person1, if( m.ufrom < m.uto, m.uto, m.ufrom ) as Person2, max( m.chatid ) as LastMessageIDPerChat, max( m.sent ) as LastMessageDate FROM chat m GROUP BY Person1, Person2 ORDER BY m.sent DESC LIMIT 50 ) PreQuery JOIN chat m2 on PreQuery.LastMessageIDPerChat = m2.chatid\r\n\r\nNo issue with the query. The error says that there is no function \"if\" in the Plugin.\r\nWhat will be the solution for this ? How can i add the function in SQLitePlugin.js ?\r\nThanks for listening my earlier issues.\r\nRegards."},"comment":{"url":"https://api.github.com/repos/brodysoft/Cordova-SQLitePlugin/issues/comments/84403982","html_url":"https://github.com/brodysoft/Cordova-SQLitePlugin/issues/220#issuecomment-84403982","issue_url":"https://api.github.com/repos/brodysoft/Cordova-SQLitePlugin/issues/220","id":84403982,"user":{"login":"rinnungirenthlei","id":10258612,"avatar_url":"https://avatars.githubusercontent.com/u/10258612?v=3","gravatar_id":"","url":"https://api.github.com/users/rinnungirenthlei","html_url":"https://github.com/rinnungirenthlei","followers_url":"https://api.github.com/users/rinnungirenthlei/followers","following_url":"https://api.github.com/users/rinnungirenthlei/following{/other_user}","gists_url":"https://api.github.com/users/rinnungirenthlei/gists{/gist_id}","starred_url":"https://api.github.com/users/rinnungirenthlei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rinnungirenthlei/subscriptions","organizations_url":"https://api.github.com/users/rinnungirenthlei/orgs","repos_url":"https://api.github.com/users/rinnungirenthlei/repos","events_url":"https://api.github.com/users/rinnungirenthlei/events{/privacy}","received_events_url":"https://api.github.com/users/rinnungirenthlei/received_events","type":"User","site_admin":false},"created_at":"2015-03-21T17:28:21Z","updated_at":"2015-03-21T17:28:21Z","body":"Ohh Okay. Thank you so much Brodybits :)"}}