Instead of going for a complex nested array, I decided that it might be best to keep it to simple two level set of arrays.
$x = array(
101 => [ (int $parent_id), (bool $completed) ],
102 => [ (int $parent_id), (bool $completed) ],
103 => [ (int $parent_id), (bool $completed) ],
104 => [ (int $parent_id), (bool $completed) ],
...
);
I realized that I was looking for something simpler like what python offers with its “list” data type. I feel like this is about as simple as I could get with storing an unorder list in PHP/MySQL. Anyone got anything better?
Related Posts:
- Customize JSON output
- Data storage for JS app using WP REST API
- data (html) migration to posts
- Changing order of db results when encoding to JSON
- access JSON results from wordpress database with wpdb
- Whats the best practise on how to store json data from a custom settings page?
- How to check and get json object in WP database?
- Insert JSON output into WordPress Database
- Difference between partition key, composite key and clustering key in Cassandra?
- How SID is different from Service name in Oracle tnsnames.ora
- What is a relation in database terminology?
- Why WordPress choose data serialization over json_encode?
- Relaunch 4.2 utf8mb4 database upgrade
- Are There Any Plans for WordPress to Support Databases Other Than MySQL?
- Reset Post IDs to less than 64bit integer
- Where can I find the database changes between WordPress versions?
- how can get database name in wordpress?
- Does WordPress use the InnoDB engine for MySQL by default?
- $wpdb->prepare() warning in WordPress 3.5
- When is it appropriate to create a new table in the WordPress database?
- Best way to import users, post and categories from an external database
- Performance tips for a large user base [closed]
- WP API V2 returning Invalid User ID
- How to delete outdated, wrongly sized images in _wp_attachment_metadata?
- wp_options is GB in size
- Can’t update database after wordpress update from 3.8.1 to 4.4.1
- $wpdb variable throw this error Call to a member function get_results() on a non-object in
- Extend the wp_users table
- Why does WordPress rely on an fully qualified site_url with a 15-step plan for moving a site?
- I have a problem with my WordPress DB after I tried to install multi-site
- Database sync between local and production
- WordPress and automated MySQL backups to a different host
- Database error Deadlock found when trying to get lock; try restarting
- Connect Second Database to WordPress
- update_user_meta() does not work
- How can I create a Bible search engine via WordPress? [closed]
- Error establishing a database connection; After importing DB & Theme
- Check if column exists for one table in DB
- Get all images from this database table
- Delete transients in website
- wp_get_current_user always returns 0 continued
- Bulk-create posts from SQL database
- Allow logged in users to store and display some data
- Replace/Mute/Stop Search Query
- I am switching laptops. I host my WP server through MAMP. I want to transfer [closed]
- How can i customize the export personal data file?
- How to merge two WordPress databases with the same structure?
- Auto login subdomain from main domain on single sites with different DB
- Logins from WP users table use on another page
- How to prevent/delay MySQL connections when an object cache is used?
- Error establishing a database connection problem in xampp saver
- I’m not able to get access to $wpdb [duplicate]
- “Error establishing a database connection” – Intermittent error on GoDaddy
- Importing Direct to DB – GUID Question
- WordPress database connection [closed]
- Changing between Local Host DB to Production DB and in reverse
- WordPress site to be able to connect with data on local machine of user
- Bulk Updating Post Date in 1 day Increments
- Query Column of Specific ID from Database Table
- Posting variables to WP database using $_POST method
- Debugging – logging database queries
- Link image with data from the wpdb
- Update multiple rows in one query
- How to direct my site to the proper URL without Dashboard
- Understanding WordPress Search
- How to add checkbox with multiple values in table?
- contact form-7 drop downs not populating database [closed]
- Cloning blog to localhost via WAMP
- Button to update database row from admin menu
- How do I get database rows from a custom table using wpdb?
- Is there an actual way to synchronize ‘production’ and ‘develop’ WordPress databases?
- Lost database connection
- How to force set same page as homepage and blogpage in static page settings
- Getting values from form and saving in database but spaces are inserted instead of form values
- Export only a part of the database for migration
- Why am I being prompted to reinstall wordpress?
- What’s the easiest way to connect external database and display data on wordpress?
- database error WordPress move from one hosting to other
- Character encoding issue – black diamond question marks on imported post excerpts
- Select data from foreach loop and send it to wordpress database
- Error establishing database connection error during first WordPress run
- Same DB for live and dev versions
- update multiple user meta field based on another meta field
- After renaming MySQL database, I can no longer access my Blog page
- Reinstall wordpress/mySQL caused database problem
- execute custom function on database connection error
- Call to a member function insert()
- Create a new table on the database and save parameters from a contact form
- not saving post in wp_post wordpress database table
- How to have WP Search widget index dynamically generated content?
- Preventing concurrent update of data
- How to add data from wordpress tables to new database tables you have created
- Creating Tables in WordPress Database
- Calling update_user_meta inside of another function doesn’t work
- How to back-up a database on IIS
- $wpdb->prepare returns empty array
- Prevent creation of unused database tables?
- Where are database files of a WordPress website?
- WP Multisite Users Not Linking
- Query a meta key using an array of values where the database value is a string