Tag Archives: MySQL

MySQL Transactions

MySQL has the ability to handle what are known as transactions: a series of queries that must be executed in an all-or-none fashion. As a bonus, it’s super easy to use. Using PHP, you can do the following: mysql_query(“START TRANSACTION”); … Continue reading

Posted in Code, Tech | Tagged , | Leave a comment

Select the last n rows from a MySQL table

I needed to figure out how to select the last four rows of a database table without reversing the order of the rows. After a little digging, I got to this point: SELECT * FROM ( SELECT * FROM table_name … Continue reading

Posted in Code, Tech | Tagged | Leave a comment