Home Projects Jobs Clientele Contact


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UU code

int user_id = 0;
string user_name;
try {
   Query query(&db,"select si_person, si_person_name from session_info");
   user_id = query[0];
   user_name = query[1];
   query.close ();
   if (!user_id)
      throw CException("User not logged in");
catch (exception& e) {
   cout << "OOPS, " << e.what() << endl;

2007/3/15, sergey@total-knowledge.com <sergey@total-knowledge.com>:
In order to perform authentication on each application page I need to find
out if user with certain ID exist in session_info table.
I want to make sure that I understand how it will work, so the question is:

1. If session_info table exist.
2. There is a one entry there (doesn't matter what the value is).

it means that current user is logged in.

Is it true?

Alexey Parshin,

Authoright © Total Knowledge: 2001-2008