Title: Batch Upload SQL Syntax Error
Last modified: January 9, 2018

---

# Batch Upload SQL Syntax Error

 *  Resolved [angeleyz](https://wordpress.org/support/users/angeleyz/)
 * (@angeleyz)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/batch-upload-sql-syntax-error/)
 * Hello,
 * I’m trying to upload files using the batch upload function and it is throwing
   the following error in my apache error log:
 * [Tue Jan 09 15:22:29.040410 2018] [:error] [pid 37170] [client XXX.XX.XXXX.XX:
   62229] 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 to 
   use near ‘AS parent JOIN AS child ON parent.id = child.parent_id WHERE child.
   type = ‘bp2w’ at line 1 for query SELECT parent.* FROM AS parent JOIN AS child
   ON parent.id = child.parent_id WHERE child.type = ‘bp2wp_sync’ AND child.name
   = ‘aioi_last_activity_time’ made by require_once(‘wp-load.php’), require_once(‘
   wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), WP_Hook-
   >do_action, WP_Hook->apply_filters, call_user_func_array, core_all_in_one_intranet-
   >aioi_check_activity, update_user_meta, update_metadata, do_action(‘updated_user_meta’),
   WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, BP2WP_Full_Sync_Loader-
   >bp2wp_update_sync_user_metadata, BP2WP_Full_Sync_Loader->bp2wp_get_parent_fields,
   referer: [http://DevWebsiteIP/~username/wp-admin/admin.php?page=memphis-documents.php&mdocs-cat=batch](http://DevWebsiteIP/~username/wp-admin/admin.php?page=memphis-documents.php&mdocs-cat=batch)
 * The error inside the website simply says: File Was Not Uploaded because an Error
   occured.
 * P.S. Occurred and referrer are spelled wrong 😛
 * Help? I’d like to use your plugin but I have thousands of documents to upload
   and there’s no way I am going to do it one by one. The FTP option isn’t working
   either but I have no way to tell you why (no error codes).

Viewing 1 replies (of 1 total)

 *  Thread Starter [angeleyz](https://wordpress.org/support/users/angeleyz/)
 * (@angeleyz)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/batch-upload-sql-syntax-error/#post-9849200)
 * Okay, nevermind… somehow the two mdocs folders in /uploads/ were set as 0755 
   instead of 0775. No idea how, but they were. All good now!!! Sorry!

Viewing 1 replies (of 1 total)

The topic ‘Batch Upload SQL Syntax Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/memphis-documents-library_91918f.
   svg)
 * [Memphis Documents Library](https://wordpress.org/plugins/memphis-documents-library/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/memphis-documents-library/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/memphis-documents-library/)
 * [Active Topics](https://wordpress.org/support/plugin/memphis-documents-library/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/memphis-documents-library/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/memphis-documents-library/reviews/)

## Tags

 * [batch](https://wordpress.org/support/topic-tag/batch/)
 * [sql](https://wordpress.org/support/topic-tag/sql/)
 * [upload](https://wordpress.org/support/topic-tag/upload/)

 * 1 reply
 * 1 participant
 * Last reply from: [angeleyz](https://wordpress.org/support/users/angeleyz/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/batch-upload-sql-syntax-error/#post-9849200)
 * Status: resolved