CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Recording user_id, date & ip_address

Print topic Send  topic

Author Message
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));

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.