coldvision
Programmer
Hello everybody,
Could somebody please help me out?
Here's my prob!
When i select an id at random, with the 'RandRange' string,
How can I avoid having the same id again in the same query?
e.g.
<cfquery name="pull_id" datasource="MySrc" dbtype="ODBC">
SELECT *
FROM MyTable
WHERE id=#RandRange(1,96)#
</cfquery>
<cfoutput query="pull_id">
#id#
<form action="same_page.cfm" method="POST">
<input type="hidden" name="id" value=#id#>
<input type="submit" value=" pull again! ">
</form>
</cfoutput>
I created some workarounds but neither of them really satisfy.
tnx
Could somebody please help me out?
Here's my prob!
When i select an id at random, with the 'RandRange' string,
How can I avoid having the same id again in the same query?
e.g.
<cfquery name="pull_id" datasource="MySrc" dbtype="ODBC">
SELECT *
FROM MyTable
WHERE id=#RandRange(1,96)#
</cfquery>
<cfoutput query="pull_id">
#id#
<form action="same_page.cfm" method="POST">
<input type="hidden" name="id" value=#id#>
<input type="submit" value=" pull again! ">
</form>
</cfoutput>
I created some workarounds but neither of them really satisfy.
tnx