When: very easy. Add a TIMESTAMP field to the table; this is automatically
updated everytime the contents of the row are altered.

Who: almost as easy. Add an IP column; When updating/inserting a row; set it
to $REMOTE_ADDR. You can use ip2long function to make the IP only 4 bytes so
that it doesn't use up lots of space.
 http://www.php.net/manual/en/function.ip2long.php )

With "who", you should really narrow down your IP permissions anyway; MySQL
has VERY powerful control over who can do what, its great (you can set that
some IPs can only select a columns of a table in a database etc, its almost
ludicrously pedantic!)

Siggy


----- Original Message -----
From: "kmurrah" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 03, 2001 5:37 AM
Subject: [PHP-DB] logging changes to a mysql database


> Greetings.
>
> Is it possible to log who and when changes are made to a mysql database ?
> If not, is there another open source DB that you could recommend ?
>
> Thanks,
>
> KennM
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to