Title: [Plugin: Staff Directory] Staff  SQL INSERTquery into database
Last modified: August 19, 2016

---

# [Plugin: Staff Directory] Staff SQL INSERTquery into database

 *  Resolved [ladylux](https://wordpress.org/support/users/ladylux/)
 * (@ladylux)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-staff-directory-staff-sql-insertquery-into-database/)
 * There is an issue with adding staff members.
 * We were getting this error when attempted to add new staff memebers (from SQL):
   `
   Incorrect integer value: 'null' for column 'staff_id' at row 1`
 * So we removed the staff_id from the sql query being called to add members, at
   Line 250 of the /staff-directory/admin/admin-functions.php
 * It now looks like this in our install (and works!):
 *     ```
       $sql = "INSERT INTO " . STAFF_DIRECTORY_TABLE . " (
       					'name' ,
       					'position' ,
       					'email_address' ,
       					'phone_number' ,
       					'photo' ,
       					'bio' ,
       					'category'
       					)
       					VALUES (
       					'" . $_POST['name-to-add'] . "',  '" . $_POST['position'] . "',  '" . $_POST['email_address'] . "',  '" . $_POST['phone_number'] . "',  '" . $_FILES['staff-photo']['name'] . "',  '" . $_POST['bio'] . "',  '" . $_POST['category'] . "'
       					);";
       ```
   

The topic ‘[Plugin: Staff Directory] Staff SQL INSERTquery into database’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/staff-directory_a19d9e.svg)
 * [Staff Directory](https://wordpress.org/plugins/staff-directory/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/staff-directory/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/staff-directory/)
 * [Active Topics](https://wordpress.org/support/plugin/staff-directory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/staff-directory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/staff-directory/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [ladylux](https://wordpress.org/support/users/ladylux/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-staff-directory-staff-sql-insertquery-into-database/)
 * Status: resolved