This topic is locked

Login Counter

9/21/2009 21:45:30
PHPRunner General questions
L
lewisekrantz author

Can someone give me an example of code to insert into aftersuccessfulLogin event that will bump a counter in the

a given table to keep track of number of logins by person

J
Jane 9/22/2009

Hi,
here is a sample:

$rstmp = CustomQuery("select count(*) from TableName where UserName='".$_SESSION["UserID"]."'");

$datatmp = db_fetch_numarray($rstmp);

$count = $datatmp[0];



Then use $datatmp[0] in your code.