- I find my table via findFirst
$user = \Model\User::findFirst([
"(email :email: OR id = :email:) AND pw = :password:'",
'bind' => array('email' => $email, 'password' => sha1($password))
]);
and is indeed get right data.
$user->setLoginTime(date("Y-m-d H:i:s"));
$user->setLoginIp($this->request->getClientAddress());
if ($user->update() == false) {
$user->rollback("Cannot Update User Login info");
foreach ($user->getMessages() as $message) {
echo $this->flashSession->error($message);
}
}
I got the error
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'username.tablename' doesn't exist
so, I am confused that why I can't save the data, and also why is
username.tablename'
not
databasename.tablename'
?