| | |
Displaying Random Result from Mysql
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Mar 2008
Posts: 217
Reputation:
Solved Threads: 4
In my Database(mysql) i have 100 members registered,Now there is page i want to display only ten members, but after each page refresh i want other ten members to display at the very same place Meaning replacing the current shown members.
Any one with the idea on how i can Do this i will appreciate.
thankx
Any one with the idea on how i can Do this i will appreciate.
thankx
This is fairly simple, use the RAND function in the SQL query:
php Syntax (Toggle Plain Text)
$sql = "SELECT * FROM tablename WHERE somefield='something' ORDER BY RAND() LIMIT 10";
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
![]() |
Other Threads in the PHP Forum
- Previous Thread: displaying image from database
- Next Thread: Ur help please!!
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array basic beginner binary broken cakephp checkbox class cms code computing cron curl database date delete directory display domain download dynamic echo email error file files folder form forms function functions google href htaccess html image include indentedsubcategory insert integration ip java javascript joomla limit link load login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote return script search select server sessions sms soap source space speed sql structure syntax system table tutorial update upload url validation validator variable video web xml youtube





