
TonyE
|
| Posted: 10/07/2002, 7:33 PM |
|
I created a user_log table
Everytime someone logs in, a new record is created with ip_address, date and user_id.
I modified the common.php in the CCLoginUser section
I am able to get insert the ip_address and date or the date and user_id but not both.
To insert the ip_address and date with the following statement:
$db->query("Insert into user_log Set log_date=NOW(), ip_address="
.$db->ToSQL(getenv("REMOTE_ADDR"),ccsText));
To insert the date and user_id
$db->query("Insert into user_log Set log_date=NOW(), user_id="
.$db->ToSQL($db->f("user_id"),ccsInteger));
But I have a hard time combining the 2 statements. Has anybody an idea on how too.
I am using PHP, MYSQL, CCS
Thanks,
TonyE
|
|
|
 |
Nicole
|
| Posted: 10/09/2002, 5:27 AM |
|
Tony,
Just concatenate them into one. Try this:
$db->query("Insert into user_log Set log_date=NOW(), ip_address="
.$db->ToSQL(getenv("REMOTE_ADDR"),ccsText). “, user_id="
.$db->ToSQL($db->f("user_id"),ccsInteger));
|
|
|
 |
|

|