storesafe / cordova-sqlite-storage

A Cordova/PhoneGap plugin to open and use sqlite databases on Android, iOS and Windows with HTML5/Web SQL API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using "Order by random()"

CasanovaGregory opened this issue · comments

Hi,

I'm trying to use the random function of Sqlite and I'm facing some problem. Is the random function supported in the plugin ? I'm using it like this :

SELECT * FROM products ORDER BY RANDOM()

In an editor like "DB Browser for SQLite" it works, but not using the plugin...

I get the following error :
"code: 5, message: "could not prepare statement (1 not authorized to use function: random)"

Any reason ?
Thank's a lot !

I was using it on Google Chrome so I assume that I was using web SQL.
Will it work on a device ?