[eluser]marcusl[/eluser]
Hi everyone. I hope you're well.
I'm having trouble with inserting data into a database on a remote machine. The error message I received is:
A Database Error Occurred
Error Number: INSERT INTO tableName (fieldName) VALUES ('value')
At first, I thought it might be an issue with permissions. However, I'm able to make GET and PUT calls without any problems. Also, my workmate is able to insert data into the database just fine. We're using the same php script, so I'm a bit stumbled.
Here's what I've got in database.php:
$active_group = "mssql_shared";
$active_record = TRUE;
$db['mssql_shared']['hostname'] = "hostname";
$db['mssql_shared']['username'] = "username";
$db['mssql_shared']['password'] = "password";
$db['mssql_shared']['database'] = "databasename";
$db['mssql_shared']['dbdriver'] = "mssql";
$db['mssql_shared']['dbprefix'] = "";
$db['mssql_shared']['pconnect'] = TRUE;
$db['mssql_shared']['db_debug'] = TRUE;
$db['mssql_shared']['cache_on'] = FALSE;
$db['mssql_shared']['cachedir'] = "";
$db['mssql_shared']['char_set'] = "utf8";
$db['mssql_shared']['dbcollat'] = "utf8_general_ci";
My insert code in the php is as follows:
$data = array(
'fieldName' => 'value'
);
$this->db->insert('tableName', $data);
I have a different database on my machine, and I can make insert calls to that one successfully. So, again, I'm wondering if it's related to the fact that I'm making this call to a remote database. However, if the error is permission related, shouldn't I get a different error message? One that relates to permissions?
If anyone knows of the solution, please let me know. If you need more information, please tell me and I can provide them. Thank you very much. Any advice would be appreciated.