RandomRecords

Returns random IDs (or any column) from SQL Database table, passing number of records to return, column to return, table name and where condition.
Returns list separated by {{$R$}}

NEWID() works in MSSQL, replace NEWID() with RAND() to use same query for MySQL

CodeFunctionName What is this?

Public

Tested

Original Work

Access is limited.

Login here using your Linkedin account. to see or download code.

No registration, not another password to remember, login using your Linkedin account and have access to all public codes in Boldcodes.com

Linkedin Login

Records, Column1, Table1, Where1

Reecs = RandomRecords(10, "ID", "BlogPosts", " where status = 1")

Views 4,690

Downloads 1,417

CodeID
DB ID