In progress (again)

This commit is contained in:
Grégory Soutadé 2010-05-15 11:45:57 +02:00
parent 74e6d36c22
commit 32f4fd2340

View File

@ -116,7 +116,7 @@ bool Database::IsValidUser(wxString user, wxString password)
wxSHA += wxString::Format(wxT("%02F"), (int)sha[i]);
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);
@ -151,7 +151,7 @@ User* Database::LoadUser(wxString name)
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())
{
@ -177,7 +177,7 @@ User* Database::LoadUser(wxString name)
}
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())
{