There are many examples where you would need to retrieve a random record or more from a set of tables. For example your page template may be cycling through QOTDs, testimonials, offers, specials, and so forth. To retrieve a random row in MySQL, use the ORDER BY RAND() statement to randomly order the rows of [...]
Category Archives: mysql
Using mysqldump to export a database
mysqldump is a useful utility for dumping the contents of an entire database to an SQL file. PLAIN TEXT CODE: mysqldump --user=dbusername --password=dbpassword db_name_here> db_name_here.sql By default the --opt option is enabled, which is a shorthand option for specifying the below options. According to the documentation, using this option "... should give you a fast [...]
