Last post Jul 05, 2015 10:48 AM by mariolopes
Jul 04, 2015 01:08 PM|mariolopes|LINK
Please give me your opinion. I have one webpage as you can see at
I have 2 formViews where I show parfums on first page. I want to show them randomly i.e. I need to create a sql statment which returns 2 random rows from my table perfums.
These formView are connected to sqldatasource and one formVew shows page one and the other formView shows page 2 from the datasource.
Wich is the fastest way to do this job?
Jul 04, 2015 02:16 PM|markfitzme|LINK
You can do an old trick such as
SELECT TOP 2 ....
ORDER BY NewId()
Jul 05, 2015 10:48 AM|mariolopes|LINK
Pointed me to the right direction
My database is one Mysql database and here's what I did
SqlDataSource1.SelectCommand = "SELECT * from perfumes ORDER BY RAND() LIMIT 2";