MySQL Random Row

To get a random row from your table, you can use the following trick: This will return a single random row from myTable. Remember that you can also use a WHERE clause to narrow down the records before choosing a random one. This is a more efficient way of finding a random result than it…

MySQL Password Function – OLD_PASSWORD() and PASSWORD()

The PASSWORD() function in MySQL can generate a hash value for encrypted passwords, similar to md5() in PHP. It is generally not recommended to use this function in an application as it is not particularly secure – it is intended for internal use. If, however, your application uses the MySQL PASSWORD() function, you need to…