On 30 Apr 2001 17:27:44 -0700, r.gelstharp <[EMAIL PROTECTED]> wrote:
> As a university degree student my final year project is a comparison on ASP
> v PHP. I have to make two identical sites in both languages, but am at the
> moment having trouble duplicating a function on my ASP pages in PHP.
> 
> The default page in my ASP pages display random records from the database to
> the screen, but I'm having a bugger of a time trying to duplicate the effort
> in PHP.

Which database are you using? If you don't have an easy database (e.g. records
from 1 to 100 allowing a simple select where ID=rand()), you'll probably need
something database specific - for example, in SQL Server you should be able to
do SELECT TOP 1 ... ORDER BY RAND(). 

Alternately, if you only have a small number of records, you could simply
select all of the records and then pick a row from the resultset at random.

Chris

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to