How would you save such a repetitive data pair inside MySQL?
As separate key/value pairs, which is what you have already done.
The only situation I would reconsider this, is if you need to filter or search for restock posts via these IDs. If that is the case then I would use a private/hidden taxonomy where each term has the post ID as the slug. Post meta is not good for searches/filtering.
Related Posts:
- What is the index [0] for on post meta fields?
- Custom field metabox not showing in back-end
- How to hide meta box values from custom fields list?
- importing data from non-wordpress mysql db
- Create meta boxes that don’t show in custom fields
- Ordering posts by anniversary using only day and month
- Move value of one custom field to another
- Displaying posts with only upcoming dates according their custom field date value
- Custom fields to save multiple values
- Difference between ‘LIKE’ and ‘IN’ in meta queries
- wp_handle_upload error “Specified file failed upload test” but still creates attachment?
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- MySQL query to set wp_postmeta using term_taxonomy_id value
- MySQL Query that looks for post with Custom Field, then changes Category
- Unique Post Meta Values
- Create Multiple File Upload Metabox in WordPress
- How to add a new meta key and assign timestamp to posts
- How do I have WP_Query match posts based on search parameter OR meta fields? (rather than search parameters AND meta fields)?
- Add custom field to all posts in specific post_type
- Button inside Custom Meta Box triggering the Update Button
- Why is my Custom Meta Box Field Inputs NOT saving?
- get_posts in meta box dropdown not showing latest posts
- How can you include custom post meta in search without calling each key?
- Display Custom Meta Box Field Only If Value is Present
- Ordering posts by custom field named “date” in backend
- Unique meta_key with array value vs repeated meta_key with single values
- shortcode in a custom metabox
- Avoiding ACF get_field and returning to core WordPress function
- Problem with saving large amount of data in postmeta/usermeta
- Move Title and the Content WYSIWYG editor position
- How to validate select field in post meta?
- How to use media upload on metabox post page without breaking TinyMCE?
- Let’s Create Custom Field Template Documentation
- How add multiple wp_editor_box to new post
- change order of images attached to post
- Can I save post meta programatically without setting metaboxes?
- Meta box values are displayed on Custom Fields list. Is it possible to hide them?
- If metabox has content display content
- put saved metabox values back into fields and then display on the front end
- Set class if a meta value is set within post archive
- WordPress Blocks, setAttributes not saving
- Allow HTML in Custom Metabox area
- Custom field metabox not showing in back-end
- Save, update, get and sanitize post meta as HTML not plain
- Create Meta boxes dynamically
- Get meta value when the page is a blog archive
- Can’t save meta field value if the title not set
- Display Data From This Custom Media Upload Meta Box?
- When post is updated, custom metadata in text area field is overwritten
- wp_postmeta are updated for only one page
- When editing a post with a custom meta box the values aren’t displaying correctly
- Dynamic background image used in css after selector
- How to add new Metadata options (Date, Author, etc.) for Posts?
- WP Query Args – search by meta_key or title
- Saving multiple custom meta box fields
- Custom post meta field effect on the performance on the post
- Difference between meta keys with _ and without _ [duplicate]
- Orderby meta_value only returns posts that have existing meta_key
- Using TinyMce with textareas in meta boxes on custom post types
- Can I query custom meta data through WP_Query
- passing argument to get_template_part() or a better way to code
- Is there a way to do multiple ordering on a multiple meta_query?
- Populating meta box with select-list of existing posts, and assigning it to custom post types
- How To Create a Metabox of HTML Content with Instructions For Editors When Editing a Post or Page?
- wp_editor in add_meta_boxes does not show gallery
- Calling Specific Pages with wp query Part II
- How do I assign this filter to a variable? (Appending php & markup to the_content)
- Copying Custom Meta Values from existing post to a duplicate post
- How do I add custom_meta_box_id’s value?
- Get a post_id where meta_value equals something in a serialized meta_value field
- little help with a mySQL query to wp database
- Importing users to Buddypress with custom fields
- How to save a ToggleControl value in a meta field?
- How to Display Custom Meta Box only on Specific Page IDs
- How can I sort homepage by a meta value?
- How make a custom search on backend in WordPress without plugin?
- Custom Metabox Not Saving
- Get updated meta value after post update or published (custom post type) using hook
- Meta Query returns wrong number of posts
- custom-meta-box checkboxes from loop won’t save
- Outputing a metabox textarea and avoid line breaks inside li tags
- How to I retrieve the ID from the Posts page?
- create custom meta box with default value
- How to get posts with a metadata numeric key greater than X?
- Importing WordPress Posts With Custom Meta Data As CSV Files Through PHPMyAdmin
- Meta_query ‘compare’ => ‘LIKE’ not working?
- Custom meta boxes not saving
- Display Meta Data with HTML?
- Group Posts By Custom Meta Value: Date
- Meta field bulk editing no longer working in WP 6.0 [closed]
- Using Customizer API vs Custom Meta Box for custom content
- Filtering posts by ACF meta query
- WordPress admin area: select box with 12.000+ options
- How to display selected option from dropdown list in a metabox
- Order Posts By Custom Field That is an array of objects
- Metabox value for post loop?
- Query Multiple meta
- Custom Metaboxes, multiple post selection
- Custom Search, MySql Query Gone Wrong?
- How we insert values into database using metabox WordPress?