I have a table with basic employee information (i.e. name, department and title). While I have no problems adding or deleting from this table, updating is giving me an odd error.
This is happening both on the test environment and the live environment that I work on. The error is "The user specified as a definer ('remote_admin'@'%') does not exist". I'm unsure what this error means or why this is only occurring on table update.
I'm updating the table simply by using the SQL:
Update office_employee
Set Title='Title Here'
Where id=117;
The code I'm using in my test environment is this:
<?
$db = new DbConnect(Config::dbhost, Config::dbuser, Config::dbpassword, "intranet", Config::error_reporting, Config::persistent);
if($db->open()) {
echo '<p>Successfully Connected</p>';
$sql = "Select * FROM office_employees";
$sql2 = "Update office_employees Set Title='Title Here' where id=117";
echo $sql2;
echo '<br />';
echo $sql;
$db->query($sql2) or die($db->error());
$results = mysql_query($sql);
echo '<br />';
echo $results;
while($row = mysql_fetch_array($results)) {
echo '<br />';
print_r($row);
echo '<br />';
}//*/
$db->close();
} else {
echo '<p>Unsuccessful in Connecting</p>';
}
?>
EDIT
The Database only has one user, the admin. There's no reason to add another user. Also, this used to work fine (according to co-workers, I'm relatively new) so it wouldn't make sense as to why this would suddenly need the definer changed. There has been no movement of the database, either, to cause any odd errors.