pucca
1
I want to random select 5 records from my database… I got this code,
SELECT Top 5 * FROM comptbl ORDER BY NewID()
but its gives me an error saying “[FONT=Arial][SIZE=2]Undefined function 'NewID() in expression.”
What must I do?
thanks for the help! [/SIZE][/FONT]:puzzled:
[FONT=Arial][SIZE=2]
[/SIZE][/FONT]
I think you are looking for the rand() function. Look here.
you can use that to got a random number in certain range then combine that with your MySQL select statement.
pucca
3
sorry man, but the sites actually done in asp. It’s a access database?.. Don’t know asp that well?..