How-to articles, tricks, and solutions about MYSQL
Best way to check if mysql_query returned any results?
To check if a MySQL query returned any results, you can use the mysqli_num_rows function.
Calculate age based on date of birth
Here is some sample PHP code that calculates a person's age based on their date of birth:
Checking for an empty result (PHP, PDO, and MySQL)
In PHP, you can use the PDO (PHP Data Objects) extension to interact with a MySQL database.
Codeigniter's `where` and `or_where`
In CodeIgniter, the where method on the database class is used to add a WHERE clause to your query.