mysql

In MySQL the default value of a column should be null or empty? What are the pros and cons?

In MySQL, when defining a  column, you have the option to set a default value. Whether you should set it to NULL or an empty value (0 in the case of INTEGER) depends on your specific use case and requirements. Here are the pros and cons of each approach: Setting the default value to NULL: …

In MySQL the default value of a column should be null or empty? What are the pros and cons? Read More »

Understand & Use $wpdb Global Object WordPress

SOME BASIC IDEA ABOUT $wpdb OBJECT AND ITS CLASS FILE For performing database operations WordPress provides a class wpdb which is present in the file – wp-includes\wp-db.php. This class abstracts the database functions for WordPressand most WordPress functions directly or indirectly use this class.We can create an object of this class to perform database operations …

Understand & Use $wpdb Global Object WordPress Read More »

Lock MYSQL tables before exporting tables

  Ensure a consistent snapshot by executing this statement to lock the tables so that they cannot be modified during export: mysql> FLUSH TABLES hr.employees, hr.managers WITH READ LOCK; While the lock is in effect, the tables can still be used, but only for read access. Unlock the tables: mysql> UNLOCK TABLES;

Scroll to Top

Don’t miss these tips!

Join us to get informed about our new posts and tips!

We don’t spam! Read our privacy policy for more info.