I have a database app that I'm using with wordpress, that creates a log when a certain field is updated in a database table (not the wordpress table). The trigger works giving me a before and after value for a particular field.
I'm trying to figure out if there is a way to have the trigger pick up the current user of wordpress. So I know there is: get_current_user_id() that I can use from php, but given that the trigger is in the table being updated, I can't figure out how I might be able to pick up the userid for the current user, and use it to add to the record being created by the trigger. Anyone have any thoughts?

Store it in a session or a temporary field, then use that value in your SQL trigger
Is this for a log/history? We did something recently and if I remember correctly, used a temporary field.