To simplify

SELECT Field1, Field2, Field3 ORDER BY Rand() LIMIT 1;

At 10:01 AM 1/15/2001 -0700, Alan Halls wrote:
>         On the site Adoption.com we have been using a mysql database to 
> set up
>families who want to adopt. We have since redesigned our site and the old
>code is not working for us. I am trying to design a section of code in ASP
>to connect to the database and return a random record. Here is what I have
>so far:
>
>         set SQL_Con = Server.CreateObject("ADODB.Connection")
>         set SQL_Rec = Server.CreateObject("ADODB.Recordset")
>         SQL_Con.OPEN application("conString2")
>         SQL_Rec.ActiveConnection = SQL_Con
>
>         SQL = "Select pp_search.profile_id, pp_search.thumbnail,
>pp_package.package_id, pp_package.profile_id from pp_search, pp_package
>where pp_package.package_id = 1 and pp_search.profile_id =
>pp_package.profile_id"
>
>         All I can get is the first record in the page. If I go to the command
>prompt I get all matching records but don't know how to randomize what I
>display on the page.
>Can anyone help? I have been working futilly on this project :)
>
>Alan Halls
>Adoption.com
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-------------------------------------
Scott Baker - Webster Internet - Network Technician
503.266.8253 - [EMAIL PROTECTED]

"Always bear in mind that your own resolution to success is more important 
than any other one thing." - Abraham Lincoln



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to