implode(",", [500,756]) will definitely return "500,756", therefore you have some other problem.
If the field type of the ‘num’ field is a numeric type such as MySQL’s INT, then MySQL or PHP might try and convert this string to a number and so "500,756" could become 500.
Check the data type of the ‘num’ field in the ‘number’ table. To store the string you want to store it needs to be a string type such as VARCHAR. Or if you’re trying to store a number with stuff after the decimal point make sure it’s e.g. a FLOAT / DECIMAL, etc. and add the value using a decimal point, e.g. 500.756.
If you need further help, show the CREATE TABLE output for your table
Related Posts:
- Undefined function mysql_connect()
- MySQL “Or” Condition
- the_date() not working
- Transaction when using WP functions rather than vanilla SQL?
- Can i use php sql functions instead of $wpdb?
- How to validate WordPress generated password in DB using PHP?
- Custom query to get post names beginning with a digit
- How to make WordPress plugin check for database changes and then do something?
- How To Make Connection To WordPress Data Base In A Plugin?
- Jquery ajax to custom php file: returning blank data
- Add value to usermeta without removing previous values?
- 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?
- How to track a users progress through pages by inserting data into WordPress Database?
- the_author_meta not working
- Performance issues with large website [closed]
- Create a quick start wordpress installation [closed]
- How to migrate the posts from an old custom legacy blog to a new WordPress website?
- theme options echoing multiple times
- PHP/MySQL issues when running WP on EC2 cloud [closed]
- WordPress 3 – how are passwords stored and how do I compare to them?
- mysqli_real_connect() – authentication method unknown to the client Warnings
- How to create another version of my site based on the same database
- how to echo all tables that start with a prefix
- Do I need to prepare query before get_results(), get_row() and get_var()?
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- Looking for most performant way to execute several similar WP queries within shortcodes
- How to select WooCommerce products by post_meta and order them
- PHP code inside shortcodes
- Show MySQL errors that occur when I excute $wpdb->insert()
- Remove one value in dismissed_wp_pointers?
- Accessing data from a non-WP database/table within a page content
- I want to select the from values from database in WordPress? [closed]
- WordPress not reflecting changed of the database
- User management system similar to wordpress one?
- How can I fix WordPress installation errors?
- SQL Injection blocked by firewall
- WP_Query adds “(wp_posts.ID = ‘0’)” so no results are returned
- How can I save unique user data on my site? [closed]
- Ordering users by custom user meta
- Long running queries
- Large Woocommerce Site (83,000 items), What Can I Do? [closed]
- Not connecting to database in file with multiple MySQL connections
- Way to bulk make all my tags lowercase?
- $Wpdb post meta query is not working with mutliple meta keys and values? [closed]
- Multiple meta_key in one global $wpdb;
- Custom array from a query only write the last row of the query
- WordPress member notification
- WordPress Block developer from exporting Database via PHP
- php include not working in custom page
- How do I display offsite database info on my wordpress site?
- Most commented posts by time period (last 12h, last 24h and etc)
- Use $wpdb or other PHP script method to find/replace in WP database
- email alert for product availability
- Issue with fetching mysql data and displaying results via shortcode in webpage
- Custom route and query
- How to unserialize data from MySQL
- How do I prepare strings for insertions as values into a MySQL table?
- Known Issues in WordPress When Upgrading PHP to ver 7
- add category to posts with tag wordpress
- How can I Use 2 databases with one WordPress install
- Edit Account – read and write to MySQL
- Why won’t this wpdb get_results query return results?
- Why when I create a new post I found 2 record related to this post into the posts database table?
- mySQL queries are executed twice on wordpress website
- Most viewed posts in WordPress
- Modify WooCommerce used to get all orders in dashboard
- Using Ajax to submit a form, and run a SQL Select query based on user input from the form
- What’s wrong in my PHP code? I’m using WordPress Astra Theme and I can’t insert data into my SQL
- WordPress low speed after migrating to new host
- Get mysql data for Quick Edit panel
- AWS Lightsail WordPress – connect to database on instance using mysqli
- call to undefined function mysql_connect
- Weird fonts showing which are coming from database
- WordPress Bad Request Error 400
- I am facing this error Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- What is the correct way to search 3 custom fields only in WordPress?
- cant insert data in a custom table in phpmyadmin
- How to import woocommerce custom fields data into another site?
- Change upload URL by mime type
- autocomplete in wordpress using ajax with json-data
- Unexpected behavior when trying to manually install WordPress on macOS Sierra
- WordPress post insertion from PHP file
- New database entry to trigger runing PHP/SQL query through link with token, without logging into the website
- Query doesn’t display text data with apostrophes
- I want show only data for today
- Rewrite SQL query as a prepared statement and use in foreach loop
- SQL Query Search page
- Include a custom field in mysql query
- Insert double entry in DB
- Splitting One Big WordPress Site into Multiple Small Sites
- How to pass username into form that sends data to database
- How to edit the default database of WordPress [closed]
- Your PHP installation appears to be missing the MySQL … After deleting and restarting from cpanel
- Execute multiple PHP Snippets causes error?
- what to do after instlling cyberpanel on VPS
- running an existing WordPress site from Visual Studio Code?
- WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax [closed]
- Updates applied to staging WordPress site affecting production even with different databases
- WordPress Query with meta_key and order by another meta_key