Hello!
I have a asp page with a .mdb database file
that has a table with the following structure:
People
-ID
-Name
i want to create a random function that returns a different number (within existing posts) each time the page is visited.
The function below random returns a number from 1-6 but i want it only to return an existing id from the database and also set the id range from "first id in database to last id in database"
Any one knows how to do this?
<%
Function RandomNumber(intHighestNumber)
Randomize
RandomNumber = Int(Rnd * intHighestNumber) + 1
End Function
Response.Write(RandomNumber(6))
%>
/Andreas
I have a asp page with a .mdb database file
that has a table with the following structure:
People
-ID
-Name
i want to create a random function that returns a different number (within existing posts) each time the page is visited.
The function below random returns a number from 1-6 but i want it only to return an existing id from the database and also set the id range from "first id in database to last id in database"
Any one knows how to do this?
<%
Function RandomNumber(intHighestNumber)
Randomize
RandomNumber = Int(Rnd * intHighestNumber) + 1
End Function
Response.Write(RandomNumber(6))
%>
/Andreas