Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- Using Rand to return 2 results


redhatlab - 9:56 pm on Aug 11, 2010 (gmt 0)


Hi,

You can use DISTINCT or GROUP BY to avoid duplicate records. Also make sure you are joining the tables using proper index, because the day the tables are big the query is going to take longer.


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4185452.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com