H
hardik
Hi friends,
can anyone solve this query ?
I have a table which stores products id and name and then product
image now all i want is everytime i refresh a page it should display 5
diffrent images then last one
I have almost 500 records in product_master table.
here is my product_master table
pid (Autonumber) pname pimage
1 abc 1.gif
2 xyz 2.png
now from site,
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_20869325.html?qid=20869325
i got this query to generate random and unique records
query = "SELECT TOP 5 Rnd(pid) AS Expr1, product_master.Text1,
product_master.Text2 FROM product_master ORDER BY Rnd(pid)"
set productimage=server.CreateObject("adodb.recordset")
productimage query,conn
do while not productimage.eof
%>
<img align="center" src="<%="images/" &
productimage.fields("imagepath")%>" border="0" />
<%
productimage.next
loop
set productimage = nothing
my query runs fine and output also shown in five records but it never
comes random always the same i need to change 5 images everytime page
refreshes,
Thank You In Advance,
Have a good day
Best Of Luck
can anyone solve this query ?
I have a table which stores products id and name and then product
image now all i want is everytime i refresh a page it should display 5
diffrent images then last one
I have almost 500 records in product_master table.
here is my product_master table
pid (Autonumber) pname pimage
1 abc 1.gif
2 xyz 2.png
now from site,
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_20869325.html?qid=20869325
i got this query to generate random and unique records
query = "SELECT TOP 5 Rnd(pid) AS Expr1, product_master.Text1,
product_master.Text2 FROM product_master ORDER BY Rnd(pid)"
set productimage=server.CreateObject("adodb.recordset")
productimage query,conn
do while not productimage.eof
%>
<img align="center" src="<%="images/" &
productimage.fields("imagepath")%>" border="0" />
<%
productimage.next
loop
set productimage = nothing
my query runs fine and output also shown in five records but it never
comes random always the same i need to change 5 images everytime page
refreshes,
Thank You In Advance,
Have a good day
Best Of Luck