Within $wpdb->insert
, you are using %d
which is used to store integer, use %f
instead which will store float/decimal values.
$registrering = $wpdb->insert(
$wpdb->prefix . 'registreringer',
array(
'fiske_vaegt' => $fiske_vaegt
),
array(
'%f'
)
);
Related Posts:
- Has anyone tried putting PHP ActiveRecord on WordPress?
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- Adding Custom Forms
- Databases – Submitting data from inputs to database [closed]
- Get wp_current_user_id using PHP and MySQL
- Adding data to custom wordpress database table
- $_POST returning empty values
- How to send custom form submissions to WordPress Database?
- Confuse between forms and tables
- Updating the database after parsing CSV document
- custom search query database in child theme
- Insert data from form to database
- How to pass username into form that sends data to database
- Custom form that stores data in mysql database
- Putting form result in my database
- Bulk data save in custom table
- Can’t insert into a database wordpress
- How to fix ‘Notice: Undefined index:’ in PHP form action
- How to return number of found rows from SELECT query
- what is the use of /wp-includes/SimplePie?
- Genesis – Customize search form
- How to export/import theme customizer settings?
- Inserting choice in database table
- WP API V2 returning Invalid User ID
- How to auto login user again after change user_login
- Handling error states with admin_post
- Duplicate domain database to local – How?
- submit the form to same page
- How can I call a row of user specific data from a custom table added to the WP Database
- How to merge local and live databases?
- WPDB: how to get the value of a field in a custom database table
- Notice: wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder
- Access/update database with jQuery
- Add custom php database code above
- wp_insert_post not working
- Any possible way to make $wpdb->get_results() return anything else than array?
- Transferring working local PHP site to wordpress – with database (MySQL)
- Custom Form Processing Issue
- Storing Array from returned database query and using the array in a new query
- WordPress not reflecting changed of the database
- Custom profile field with birthday. Troubles with
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- How can I save unique user data on my site? [closed]
- Post + form + action + results on the same page
- Input data from email form not going to JSON file
- Using custom tables for old posts
- How to show a ‘correct’ message after submit a form?
- WordPress admin-ajax.php 400 bad request
- Ajax contact form return 0
- Search WordPress using static html page
- Is it best to avoid using $wpdb for security issues?
- Should I use WordPress to skin a database website?
- Creating Database Table vs. Adding MetaData to Post & User
- How to put a form with php code into a variable or shortcode?
- Shortcode to embed Edit Account form not working
- Capture form data in one function and use it in another function (same file)
- Cant connect to database with php 7.3
- How to get image from url from the database?
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- Creating custom page template from existing PHP site
- wordpress site – using custom database and PHP
- WPDB secure custom form
- Adding attribute to the post.php form tag in wp-admin
- Front end file upload returning wrong attachment url
- WordPressUser Submission Form
- Cascading dropdown select search based on Parent Page & Child Page
- Change wordpress’ database data using ajax – how to get current user id?
- Create a new account on site B with data from the purchase of site A
- How to search order using database frontend short code WordPress
- PHP Warning: mysqli_query(): after updating my websites php from 5.6 to 7.2
- PHP multiple forms, same page, isset($_POST[]) not working?
- “Class Not Found” in HTML Form Target PHP File that contains the class
- Unable to insert two value in two different columns (WordPress database)
- Retrieving and Displaying Data From a Table
- why not selecting multiple rows of same standard_id using SQL query from database?
- Store user form submitted information in post type
- Implement jQuery Smart wizard
- Can I disable auto increment of WordPress Posts Database to utilize previously deleted records?
- How do I stop my form from adding code to current page URL instead of re-directing. Been stuck for days
- getting the values of hidden inputs to use them in a php mysql query
- If input field has value Require another field – PHP
- Front end/Database connection in WP
- Issue in url update when using wordpress update query
- can’t delete a row from post_meta table
- Submitting my form to the database and then redirecting to payment site
- Post from front end form to post_meta
- Accessing values entered via form – try again
- Nonce fail after second submit attempt
- Styling admin page rows in order of importance (checkboxes)
- Let users register weight each day and save it in DB
- Query specific posts per user selections from dropdown menus
- Fetching wpdb data from a php file seems to break?
- Data inserted in database, but ajax calls error function
- upload images on front by user using form
- save array of objects with update_option
- Redirect loop upon installation of my plugin
- Execute multiple PHP Snippets causes error?
- Field validation strlen works in php7.4 fails 8.1 [closed]
- Embed PHP script into WP – what is the best way
- Preventing script injections in HTML form