Skip to main content
Known Participant
October 28, 2009
Question

[Locked] Really need help trying to log users

  • October 28, 2009
  • 1 reply
  • 410 views

I really need help trying to show when members have logged in.  This is my second post and and the code that I was given, didn't work and now I can't get anyone to tell me what is wrong with it.  Here is the code and error message:

Error message is "Unknown column 'billsmith' in 'where clause'

Here is the code I am using:

mysql_select_db($database_connRegister, $connRegister);

$logged_in_user = "-1";

if(isset($_SESSION['MM_Username'])) {

$logged_in_user=$_SESSION['MM_Username'];

$query_online_now = "UPDATE users SET logged_in='Online', last_login_date=NOW() WHERE user_name=$logged_in_user";

$online_now = mysql_query($query_online_now, $connRegister) or die(mysql_error()); }

$query_not_online_now="UPDATE users SET logged_in='Offline' WHERE last_login_date<NOW() - INTERVAL 60 MINUTE";

$not_online_now=mysql_query($query_not_online_now, $connRegister) or die(mysql_error());

Can someone please tell me why it isn't working?

This topic has been closed for replies.

1 reply

David_Powers
Inspiring
October 29, 2009

This question has been answered here: http://forums.adobe.com/message/2351465#2351465.

Locking this thread to avoid duplication. Please reply in the original thread if any further help is needed.