Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
|
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 28th, 2005, 10:08 PM
Registered User
 
Join Date: Sep 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jialin Send a message via Yahoo to jialin
Default display random record from access database

Hi,

Could anyone help me?
i want display random record from access database, the number of record to be display is selected by user, using a textbox.

Thanks
Jialin

 
Old December 2nd, 2005, 09:18 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try:
Dim RandNum, NumOfRecords

RandNum = Int(Rnd * NumOfRecords) + 1

Hope it works,
John M






Similar Threads
Thread Thread Starter Forum Replies Last Post
database record does not display magmo Classic ASP Basics 2 September 27th, 2007 03:46 PM
Flagging a Random Record ptleitch SQL Server ASP 0 April 3rd, 2006 09:58 AM
Display a random record for 24 hours palvin SQL Language 6 February 6th, 2006 10:36 AM
Random Table/Field/Record Ravenwillow VB Databases Basics 10 August 18th, 2005 08:10 PM
Display one database record Mikej00 Classic ASP Databases 1 December 1st, 2004 07:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.