Yes, we can use existing tables in WordPress for storing the values.
Post meta fields are stored in the {$wpdb->prefix}_postmeta
table (depending on the table prefix; wp_postmeta
by default). If the meta key "like_count"
is already present in the table along with the post ID then update_post_meta()
will update this, and otherwise this function will insert a new row with this key.
For more reference you can check here : https://codex.wordpress.org/Function_Reference/update_post_meta
Related Posts:
- Why WordPress choose data serialization over json_encode?
- Dealing with Many Meta Values, 30+
- What is the most secure way to store post meta data in WP?
- How to delete outdated, wrongly sized images in _wp_attachment_metadata?
- Meta query interfering with orderby relevance
- Migrating non-WordPress CMS to WordPress, lots of data to move — possible solutions?
- How to solve slow WordPress site caused by attachment_metadata
- Delete all post meta except featured image
- Is it possible to store visitors IPs in wp_postmeta table?
- Multiple postmeta with same name for one post in wp_postmeta table
- Delete all post meta except featured image Using SQL
- One post carries 30 postmeta values, is this too much?
- delete post meta from db, even if does not exist?
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- Storing data for a wordpress plugin
- Structure of postmeta meta_value for woocommerce product download
- Routine to convert custom post meta from old to new value
- Saving zero as meta value
- Uknown meta entries in wp_postmeta
- Does post_meta data need to be unserialzed?
- Link image with data from the wpdb
- Custom Post Type not showing anything added by code anymore?
- Compare User meta_value with Product meta_value
- How to save EXIF metadata in WordPress database?
- _wp_attachment_metadata is not being added to database when PDF files uploaded
- “BS_” rows in postmeta table
- Migrating meta_key and meta_value from old theme to new one
- Database structure for thousands of posts
- How much post meta data is too much?
- How do i get value from wp_postmeta?
- Recommended Post Structure for DB Storage
- SQL query : Select a thumbnail for a media
- Is it fine to have foreign key as primary key?
- Detecting errors generated by $wpdb->get_results()
- Custom form that store input in database
- Restoring WordPress posts from database only
- Displaying content from one WP site on separate WP site
- Issue with wp_insert_post and post_content field error Could not update post in the database
- wp_posts – guid update
- So much data in postmeta
- Performance Gains of Relational DB Setup
- store simple data in get_option()
- What are conventions about the schema of the $table_prefix
- BuddyPress: What’s the use of wp_bp_xprofile_data table and how does it get updated? [closed]
- What is an efficient way to query based on post_meta?
- storing database in version control
- Is deleting orphaned wp_options entries safe?
- How to build a movie database with wordpress?
- Sub-domain or 2nd, temporary different domain?
- How do i get user data from a custom table in the wordpress database by user ID?
- Converting WordPress into Android or iPhone app
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Database slowdown after update to 3.4.1
- WooCommerce sku location in DB
- How to insert data into MySQL database from the form created in WordPress site
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- Emoji support and MariaDB 10.0.30-
- Can I have multiple database users within WordPress?
- Modify Database in Multi-Site wp_usermeta table
- Form Data not getting stored in WordPress database
- How to Mirror WordPress database from Remote server to Local server
- WordPress returns to an old version
- data (html) migration to posts
- Super slow queries from author archive pages killing my database
- localize elements in database
- Use same database on main domain & sub domain
- Moving to another server database connection error [closed]
- Best practice to limit results in get_row()?
- Connect to another WP install and grab post based on custom field
- Which table (and column) has the content of configured get_post_meta?
- Serialize data before inserting into the DB
- Reinstalling wordpress from database breaks the site
- Pages from custom table
- Trouble running $wpdb->query() with last_insert_id
- Can I customised default WP table
- Woocommerce – Check product stock availability from external database
- Get results from wordpress data custom table
- WordPress where clauses in db select
- How to display data from db in select list [closed]
- Will adding & modifying default WordPress table index break future WordPress update
- Database migration issues – Error #1046 No database selected
- echo site_url() returns a different value than what is in the database siteurl field
- Native timestamp on wp_options option
- SELECT rows between two datetimes when the range is dynamic [closed]
- How to get the full stack trace for WordPress “table doesn’t exist” error in debug.log?
- How to access a table in a wordpress database using REST API?
- error establishing a database connection 3
- Correct and secure way to access a custom SQL database in a custom PHP template file
- Does WordPress Support Using Named Pipes on the Windows Operating System?
- Missing latest posts and options after DB migration via phpMyAdmin
- Custom metabox does not store data
- Local host to server import problem
- “MySQL server has gone away” since update to 3.8
- featured image not showing up with mysql_connect
- Getting deleted users in database
- Options of accessing wordpress data from mobile app
- Getting data from a table using a query
- Database interaction (private-public) [closed]
- Cant Connect to Database
- WordPress database connection failed, while mysql client is working [closed]