Well if you want to get a random article from the db and the autonumber is
all out of whack you could do this to pull a random one from the database:
<cfquery name="number" datasource="mydb" dbtype="ODBC">
select item_id from table
</cfquery>
<cfset val1 = #valuelist(number.item_id)#>
<cfset val2 = #randrange(1,number.recordcount)#>
<cfset val3 = #ListGetAt(val1, val2, ",")#>
<cfquery name="getimage" datasource="mydb" dbtype="ODBC">
select * from table where item_id = #val3#
</cfquery>
I think this will do it......
Or did you need something else altogether?
Tim Hill
----- Original Message -----
From: Robert Everland III <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 27, 2000 11:38 AM
Subject: RE: Password protected directories
> Ok here is my problem, I have a database that has news articles. Now what
> my boss wants me to do is make it so the first feature story you see on
the
> page is different each time you come on. It can be random and it can loop
> over once you have seen all the feature articles. The problem is the only
> unique field is the autonumber field so the feature articles could be
> 15,18,34,48,78. How would I be able to make it so each article is
different.
> Anyone have something they have already done that I could use or modify?
>
> Robert Everland III
> Network Administrator
> Orlando.com
>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.