[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 1So 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.