Is there a way to select a completely random image or something similar to that from the database, I know you can do LIMIT 0, 1 but I want it to be random, is this possible?
ORDER BY RAND() LIMIT 1
Just have that clause in your query, you should be good to go...
ORDER BY RAND() combined with LIMIT is useful for selecting a random sample from a set of rows: mysql> SELECT * FROM table1, table2 WHERE a=b AND c<d -> ORDER BY RAND() LIMIT 1000;
ORDER BY RAND() combined with LIMIT is useful for selecting a random sample from a set of rows:
mysql> SELECT * FROM table1, table2 WHERE a=b AND c<d -> ORDER BY RAND() LIMIT 1000;