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
- database sent to a JSON file
- Input data from email form not going to JSON file
- How to get the value of input hidden html from text editor to custom page template?
- inserting a post from an extern php file but post content doesn’t show on wp site
- Show success or error messages in Ajax response to WordPress custom registration form
- Styling my own password protected page, how to deal with wrong password?
- Contact form won’t submit
- wp_mail file attachment not being placed in upload folder?
- Search Query: how to construct a search string from two select elements?
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Using custom tables for old posts
- How to show a ‘correct’ message after submit a form?
- Form Security: nonce vs. jQuery
- WordPress admin-ajax.php 400 bad request
- Not connecting to database in file with multiple MySQL connections
- Ajax contact form return 0
- Filtering a Database Query
- Trying do build a contact form
- “operation successful” message
- User register hook is not working in woocomerce register form
- Search WordPress using static html page
- Display Data in Table from External Database in WP using Shortcodes
- Is it best to avoid using $wpdb for security issues?
- How can I import an excel column into wordpress database?
- Blob file download problem
- WordPress Block developer from exporting Database via PHP
- How to retrieve the data from the sever and displaying it in a page?
- How to execute html code inside php?
- Execute a function every hour in the background
- Create page with custom php script and fetched data
- wpdb prepare insert table doesn’t work
- Should I use WordPress to skin a database website?
- How do I display offsite database info on my wordpress site?
- Creating Database Table vs. Adding MetaData to Post & User
- How to put a form with php code into a variable or shortcode?
- Can a page contain php code?
- WordPress and MySQL: trying to print data using PHP from user_meta custom field data
- How to send form data from WordPress (Meta Box) to an OData service?
- Building a REST API for your web app exposes primary keys of DB records?
- Most commented posts by time period (last 12h, last 24h and etc)
- What is the alternative code to if (isset ($_POST) && !empty ($_POST) to avoid warnings?
- WordPress shortcode returns the data before
- Shortcode to embed Edit Account form not working
- Form Submission Not Working In Custom Theme
- Saving data from custom form in wordpress database
- Capture form data in one function and use it in another function (same file)
- How can I find the cause of a 500 server error?
- I can’t update my data through $wpdb
- wpdb Cannot Update column in Database
- Can’t successfully check if post with title exist in database
- Cant connect to database with php 7.3
- Lost in trying to create user database system
- Delete database record using plugin from admin panel
- How to display success message correctly and delete it when the page is refreshed
- Using admin-post.php for admin form but it directs me to admin-post.php white screen
- How to get image from url from the database?
- Why does my user not get added to the database on custom registration?
- Set default Database Storage Engine when creating tables with plugins?
- Wpdb get->results to out the the month from the db
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- How to add post meta in while loop?
- Filter results from a serialized string to use on statistics
- How to add data to a custom field at the wp_users table?
- Creating custom page template from existing PHP site
- wordpress site – using custom database and PHP
- How to set cookies
- PHP Contact form
- Adding Additional Variables on Menus Page
- form built dynamically with php, not submitting
- WPDB – Read and write value from / to database
- PHP- Why is my contact form keep showing it is invalid? [closed]
- Simple php in wordpress widget [closed]
- Search only working on front page (index) , not working on other pages
- How do I make this Metabox show current DB value?
- form $_post action value gets truncated after it passes through two forms
- How to Generate a list of Most Commented post?
- Pass important values server-side when processing form
- WPDB secure custom form
- Adding attribute to the post.php form tag in wp-admin
- How to make blog post entries appear as input form instead of just text?
- Why when I create a new post I found 2 record related to this post into the posts database table?
- Make a page (url) not cacheable [closed]
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’