In progress (again)
This commit is contained in:
parent
74e6d36c22
commit
32f4fd2340
|
@ -116,7 +116,7 @@ bool Database::IsValidUser(wxString user, wxString password)
|
||||||
wxSHA += wxString::Format(wxT("%02F"), (int)sha[i]);
|
wxSHA += wxString::Format(wxT("%02F"), (int)sha[i]);
|
||||||
req = _("SELECT name FROM user WHERE name='") + user + _("' AND password='") + wxSHA + _("'");
|
req = _("SELECT name FROM user WHERE name='") + user + _("' AND password='") + wxSHA + _("'");
|
||||||
|
|
||||||
req.Printf(_("req : %s\n"));
|
std::cout << req.mb_str() << "\n";
|
||||||
|
|
||||||
EXECUTE_SQL_QUERY(req, set, false);
|
EXECUTE_SQL_QUERY(req, set, false);
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ User* Database::LoadUser(wxString name)
|
||||||
|
|
||||||
req = _("SELECT * FROM account WHERE user='") + user->_id + _("' ORDER BY default DESC, name ASC");
|
req = _("SELECT * FROM account WHERE user='") + user->_id + _("' ORDER BY default DESC, name ASC");
|
||||||
|
|
||||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, NULL, {delete user;});
|
EXECUTE_SQL_QUERY_WITH_CODE(req, set, NULL, {delete user;}, {delete user;});
|
||||||
|
|
||||||
while (set.NextRow())
|
while (set.NextRow())
|
||||||
{
|
{
|
||||||
|
@ -177,7 +177,7 @@ User* Database::LoadUser(wxString name)
|
||||||
}
|
}
|
||||||
req += _(") ORDER BY year ASC");
|
req += _(") ORDER BY year ASC");
|
||||||
|
|
||||||
EXECUTE_SQL_QUERY_WITH_CODE(req, set, NULL, {delete user;});
|
EXECUTE_SQL_QUERY_WITH_CODE(req, set, NULL, {delete user;}, {delete user;});
|
||||||
|
|
||||||
while (set.NextRow())
|
while (set.NextRow())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user