Title: Import not working
Last modified: September 1, 2016

---

# Import not working

 *  [smelliott](https://wordpress.org/support/users/smelliott/)
 * (@smelliott)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/import-not-working-22/)
 * I am attempting to upload 37 records through the import function. The function
   reports success, 37 records added. However, there are no additional records in
   the table or that show up on the list participants option. I did not include 
   ID (it is an auto increment thinking I did not need to) or the private_id field.
   Do I need to include them? Can I just import the data at the database level and
   make up a private_id value? I did not order the fields in the same order as the
   blank csv file, is that required?
 * [https://wordpress.org/plugins/participants-database/](https://wordpress.org/plugins/participants-database/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [smelliott](https://wordpress.org/support/users/smelliott/)
 * (@smelliott)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/import-not-working-22/#post-7615964)
 * found a little more info on debug:
    WordPress database error Column ‘date_updated’
   specified twice for query INSERT INTO
 * …[-] Participants_Db::process_form storing record sql=INSERT INTO xx_participants_database
   SET `date_recorded` = NOW(), `date_updated` = NOW(), `first_name` = %s, `last_name`
   = %s, `address` = %s, `city` = %s, `state` = %s, `zip` = %s, `phone` = %s, `email`
   = %s,……. `private_id` = %s, `date_recorded` = %s, `date_updated` = %s,……
 * it looks like you code is listing the date_updated and date_recorded twice in
   the sql statement…
 *  Thread Starter [smelliott](https://wordpress.org/support/users/smelliott/)
 * (@smelliott)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/import-not-working-22/#post-7615973)
 * I commented out the following to get th import to work. I know this is not a 
   fix, but worked for now.
 * case ‘insert’:
    $sql = ‘INSERT INTO ‘ . self::$participants_table . ‘ SET ‘; 
   if ( !PDb_Date_Parse::is_mysql_timestamp( @$post[‘date_recorded’] ) ) // $sql.
   = ‘ `date_recorded` = NOW(), ‘; <-commented out if ( !PDb_Date_Parse::is_mysql_timestamp(
   @$post[‘date_updated’] ) ) // $sql .= ‘ `date_updated` = NOW(), ‘;<-commented
   out $where = ”; break;
 *  Thread Starter [smelliott](https://wordpress.org/support/users/smelliott/)
 * (@smelliott)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/import-not-working-22/#post-7615976)
 * interesting, would only handle 16 records at a time. had to split into two files.
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/import-not-working-22/#post-7616065)
 * Thanks for all the info, I’ll have a look at this. The alterations you made will
   prevent new or updated records from being properly timestamped, just so you know.
 * What exactly happened when you tried to import more than 16 records?
 *  [Martin Sauter](https://wordpress.org/support/users/martinsauter/)
 * (@martinsauter)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/import-not-working-22/#post-7616201)
 * I had a similar problem: When importing a CSV file with 39 records the confirmation
   message looked fine (39 records added), but in the end I got only 13 records 
   in the database.
 * It took my while, but the solution was rather simple: The file was not UTF-8 
   encoded, so any record with a non-ANSI character was not imported.
 * I am not sure if smelliott has the same problem, but maybe my contribution is
   helpful for other users.
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/import-not-working-22/#post-7616202)
 * Martin, that’s good info…and correct. What I need to do is provide accurate feedback
   to the user for cases like this.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Import not working’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

## Tags

 * [csv](https://wordpress.org/support/topic-tag/csv/)
 * [Import](https://wordpress.org/support/topic-tag/import/)
 * [participant database](https://wordpress.org/support/topic-tag/participant-database/)

 * 6 replies
 * 3 participants
 * Last reply from: [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/import-not-working-22/#post-7616202)
 * Status: not resolved