Anybody know how good LSQL's random database selection is? If I have some category with 100 links and I want to pull x random links every two weeks, is it going to be truly random?
Nov 19, 2004, 9:27 AM
Veteran / Moderator (18436 posts)
Nov 19, 2004, 9:27 AM
Post #2 of 4
Views: 1992
In terms of what being random? If using RAND(), then this is a MySQL function ... but LSQL uses it. Or are you refering to the code in Jump.pm?
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Nov 19, 2004, 10:09 AM
Veteran / Moderator (18436 posts)
Nov 19, 2004, 10:09 AM
Post #4 of 4
Views: 1998
Ah, through a global I'm guessing?
If the query looks something like;
select_options('ORDER BY RAND()');
....then it should be the MySQL random, which is pretty good (IMO) at getting random numbers. You can go a bit more advanced, and use some perl code to come up with a random row, depending on the number of entries. I believe Jump.pm has this in it.
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
If the query looks something like;
select_options('ORDER BY RAND()');
....then it should be the MySQL random, which is pretty good (IMO) at getting random numbers. You can go a bit more advanced, and use some perl code to come up with a random row, depending on the number of entries. I believe Jump.pm has this in it.
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!