Hi,

in http://www.sqlite.org/lang_corefunc.html the random() function is 
documented as taking no arguments,
So, use
SELECT word FROM dict ORDER BY RANDOM() LIMIT 1;

I tried an older version of sqlite (can't say which, but 3.*), and could 
call random() with 0, 1, 2, 3 and 4 parameters. I would be interested 
what this means.

Martin

Alberto Simões wrote:
> Hello
>
> I am using random as:
>
> SELECT word FROM dict ORDER BY RANDOM(term) LIMIT 1;
>
> And I am getting:
>
> DBD::SQLite::db prepare failed: wrong number of arguments to function
> RANDOM()(1) at dbdimp.c line 271 at OpenDict.pm line 64.
>
> (yes, using it through DBD::SQLite, but I do not think that is the problem).
>
> Thanks
> Alberto
>   
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to