WordPress provides well-optimized built-in methods for accessing the existing database tables. Therefore, we don't need to write our own queries. Let's see how basic Create, Read, Update, Delete (CRUD) operations are executed on existing tables.
All the existing tables contain a pre-built insert functions for creating new records. Some of these functions uses a predefined set of parameters while other functions accepts array of information for inserting the record. Let's take a look at some of the frequently used insert functions:
Creates a new post or page in the
Creates a new option in the
Creates a new user in the