SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: random query
-
Dec 28, 2005, 06:18 #1
- Join Date
- Jun 2005
- Posts
- 74
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
random query
hi,
pls how can i achieve this senerio: i want a new set a data (records) to be displayed to the client each time he accesses the site instead of static data.
in order words i want a different set of records to be displayed each time the site is accessed or the query should be randomized.
A typical senerio could be an online book store that displays differents books up for sale instead of just static data
pls i need this in real good time thanks
-
Dec 28, 2005, 06:23 #2
- Join Date
- Jul 2002
- Location
- Toronto, Canada
- Posts
- 39,347
- Mentioned
- 63 Post(s)
- Tagged
- 3 Thread(s)
which database system?
also, have you searched this forum?
http://www.sitepoint.com/forums/showthread.php?t=286692
http://www.sitepoint.com/forums/showthread.php?t=271369
-
Dec 28, 2005, 06:33 #3
- Join Date
- Jun 2005
- Posts
- 74
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
mssql
-
Dec 28, 2005, 06:43 #4
- Join Date
- Jul 2002
- Location
- Toronto, Canada
- Posts
- 39,347
- Mentioned
- 63 Post(s)
- Tagged
- 3 Thread(s)
select top 1 foo from yourtable order by newid()
-
Dec 28, 2005, 07:00 #5
- Join Date
- Jun 2005
- Posts
- 74
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thanks man this really works i appreciate
Bookmarks