To start with, you need to fix the define of CSV_PATH:
define('CSV_PATH',dirname(__FILE__));
as without that, $handle will be false – no file opened or data read.
…then before you run it take another look becaue $col4 and $col5 are not set anywhere either…
Related Posts:
- Fatal error: Call to undefined function mysql_connect()
- Invalid column count in CSV input on line 1 Error
- Query both first_name and last_name from wp_usermeta at the same time
- How to get the list of WooCommerce product image of a certain category from database?
- Custom query to get post names beginning with a digit
- How to add query vars with paginated URLs?
- Changing user_nicename
- WordPress will not operate correctly
- How to Join two tables from separate databases within WordPress
- tag search using WP_Query
- simple wordpress ajax plugin not working when not logged in
- Install will not load: PHP does not have MYSQL installed
- Insert post without actions/hooks
- Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- the_author_meta not working
- Import 10,000 Users into WordPress WITH a specific ID for each user
- if statement on database query
- Is the regular ajax request method safe or I should use admin-ajax.php?
- Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error
- How to get the post_id from postmeta
- Sortable admin column for one meta key with three possible meta values
- WordPress Ajax Custom Query – High CPU LOAD
- AJAX in WordPress, sending coords data to MySQL and show after into map
- Styling images coming from another blog
- register_activation_hook isn’t adding table to DB
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- Query String being Removed Creating a Pagination Issue within a Custom Plugin
- How to convert objects into arrays
- Ajax $wpdb not returning table data
- Converting MYSQL to WordPress $WPDB
- Is there a way to get 3+ dimensional array from a single MySql command
- Why is file_get_contents returning page source?
- Can’t get wp_insert_post to work
- I want to select the from values from database in WordPress? [closed]
- mysql query from wordpress page using custom table
- User management system similar to wordpress one?
- Importing Geo data into wordpress database
- PHP Fatal error: Uncaught mysqli_sql_exception: Table doesn’t exist in wordpress/wp-includes/wp-db.php
- SQL Injection blocked by firewall
- How to check if a meta value has already been assigned to any user?
- WP_Query adds “(wp_posts.ID = ‘0’)” so no results are returned
- Ordering users by custom user meta
- Long running queries
- 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]
- php include not working in custom page
- Force Users To Relogin
- email alert for product availability
- Basic wpdb update question
- A $_POST should occur when submit form but is not?
- Pull MySQL data from multiple tables and merge into 1 PHP array
- How do I prepare strings for insertions as values into a MySQL table?
- Using CFDB7 vs Custom MySQL Database [closed]
- add category to posts with tag wordpress
- How can I Use 2 databases with one WordPress install
- ‘pre_user_query’ interfering with user export
- Custom CSV exporter – Cannot modify header information – headers
- Why won’t this wpdb get_results query return results?
- Adding data to custom wordpress database table
- select a single val though a table in wordpress
- populate select options from extra mysql table data
- Removal of all posts content in bulk, keeping the posts itself
- Using Ajax to submit a form, and run a SQL Select query based on user input from the form
- How to store checkbox data for individual users?
- WordPress low speed after migrating to new host
- AWS Lightsail WordPress – connect to database on instance using mysqli
- call to undefined function mysql_connect
- Usermeta data unserialize, extract and display in table in WordPress
- I can’t separate the array by commas
- Using wpdb to connect to a different database is not working
- How to edit content in WordPress and the Polylang – plugin? – with demosite
- Export WordPress User Meta to CSV/Excel
- How can i limit the number of posts to the most recent 6 in my query?
- Change upload URL by mime type
- How do I get data from my database into my Custom Export Field
- Insert data from form to database
- (Who to follow) Twitter widget
- Prepared DB Query from _POST array
- Force CSV download with template_redirect
- How can I display a query in a page?
- How to properly send many mysql queries via php and what happens with ajax requests after they are sent?
- Conditional statement within WP SQL query
- Passed variable gets undefined variable error on insert on next page
- How to set up an auto delete post?
- WordPress upload images not displaying
- two wordpress sites, two themes, one database, same content
- how to check for wordpress Query errors
- MySQL database migration to WordPress
- Custom query_posts() parameter
- MySQL update text field with ‘
- Query Concatenation
- Display total count of products in orders of a specific order status
- How to get a database field value from a WordPress table? [closed]
- Execute multiple PHP Snippets causes error?
- Error resetting database index using ALTER TABLE in $wpdb->query
- Creating posts with php-script + csv
- what to do after instlling cyberpanel on VPS
- Can’t insert into a database wordpress
- Updates applied to staging WordPress site affecting production even with different databases