Load the existing option first and save the new data as an element in an array:
// get the option
$data = get_option( 'row_name' );
// add new data to the option
$data[] = $options;
// save it back to the db
update_option( 'row_name', $data );
Your option will then be an array of arrays instead of just a single array:
Array
(
[0] => Array
(
[py_name] => username
[address] => addy
[coords] => results
)
[1] => Array
(
[py_name] => username
[address] => addy
[coords] => results
)
)
Related Posts:
- Will it break my site if I delete all transient records in wp_options table?
- Please explain how WordPress works with MySQL character set and collation at a low level
- What is the purpose of the option name hack_file in the options table?
- delete_option() and update_option() returning false
- How to change option recently_edited?
- store simple data in get_option()
- WP_Options ID high
- Transient RSS feeds in wp_options not removed automatically?
- Long option names fail silently?
- Huge wp_options table
- Cannot unserialize WordPress serialized values in `wp_options` table?
- WordPress DB: options-table –> 32 gzipcompression?
- wp_options table has duplicate rows and primary key / autoincrement has been removed
- Help running a MySQL query to update all wp_#_options tables in a Multisite install
- What ALL can cause “Another update is currently in progress.”? [closed]
- Should I remove transients from the wp_options table?
- I don’t see site_url and home_url fields in wp_options table (phpMyAdmin)?
- Accidentally deleted active_plugins portion of the wp_options DB table
- batch UPDATE autoload value in wp_options table
- Multiple wp_options tables to share content across installs
- Is there an atomic way to update_option in WordPress (to ensure data integrity)?
- Does auto_load to ‘no’ in wp_options improve performance
- Check if an option exists and get its value in one hit
- My options table is huge. What can I do?
- Change options table prefix only
- When to use custom DB tables or add_option?
- In which format the data is stored in WordPress Databases?
- Automate WordPress website setup with prefilled data
- Image link issues after importing a database backup to my local web server
- Native timestamp on wp_options option
- Whats the best practise on how to store json data from a custom settings page?
- WordPress Settings API Overrides My Previous Value
- What structure and database storage method should I use for temporary storage that may be written concurrently?
- get_option() does unserialize and don’t remove \
- I cannot change anything in my wordpress database from within wordpress?
- Wrong url for the images while using same database for two WordPress installations
- Options table – where does my values go?
- Theme options not being sent to Database
- Multiple Address In WP-Option Value
- How do I use update_option to give me a new option name each time a form is submitted? [duplicate]
- What is this JavaScript “require”?
- How can I make updates to a site, on a development copy, but then move updates back without overriding live site’s evolving database?
- How can I make a WordPress database portable and url independent?
- wpdb->insert multiple record at once
- How to migrate a HTTPS WordPress installation to localhost?
- How to stop WordPress using utf8mb4_unicode_520_ci collation?
- How to monitor server for error establishing a database connection
- Default WordPress settings API data sanitization
- Fatal error: Call to undefined function dbDelta()
- Connect to remote database using Localhost install
- remove missing image attachments
- How to ensure data consistency in WordPress
- Efficiency on displaying random authors based on large database
- How to write Hebrew characters?
- Error establishing a database connection – with Debug Data
- Finding the login page from database?
- When and why should I use $wpdb different return types?
- Database with mixed collation (utf8mb4 & utf8_general_ci)
- WordPress doesn’t show all posts in database
- Adding new row to wp_post table
- Extracting the post_id via the wp_insert_post action (external db query)
- How to interact with another wordpress install on same database?
- What is the proper way to validate and sanitize JSON response from REST API?
- Saving into post_excerpt or post_content
- Maintain user profile data in a non-WordPress database
- How to fix the disappearance of the “\” character when updating a post in the database
- Data storage for JS app using WP REST API
- Setup 3 Sites To Connect To 1 Database and Share Data
- How can I push local database changes to production, without impacting recent posts/pages that were published on production server?
- Setup private content for specific users with daily updates [closed]
- Connection refused on locahost after importing database?
- WSOD 3.9.1 – Tried Everything so far
- Can you refresh ONLY the wordpress adminbar and not the whole page?
- Sending posts from Python to WordPress
- Problem migrating to localhost
- SQL query to set posts in bulk based on the post content
- How do you render posts from outside wordpress?
- Second ezSQL initialization for MSSQL
- Fetch a single row from a custom table for to a given ID
- Database create or redirect
- Database structure cheatsheet
- White Screen in Home Page
- Continuous SQL query errors from outside source
- How to escape percentage sign(%) in sql query with $wpdb->prepare?
- Migrate Users From laravel to wordpress
- WordPress has been updated! Before we send you on your way, we have to update your database to the newest version
- how add more field to wp user and save it to database
- Malware in old website – how to migrate?
- error establishing database connection (WAMP + filezilla)
- How to display $wpdb->insert_id; value on redirected page
- Should I Use only wpdb Class to Write Custom Queries?
- Auto populate form fields based on serial input or pull listings from other websites?
- How to extract some part of WordPress full source code
- Error establishing a database connection for some files
- Hash user emails in database?
- Database Name Change
- Weird characters in title if it contain “ ”
- Where To Find bb_profile_data(); In bbPress?
- One information repeated on multiple locations on one site [closed]
- Showing Error(TAble already exist)