Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

how to make an insert in User Table

Quote Reply
how to make an insert in User Table
hello i would like to make an insert from forum_vie.html when a user go in this forum

like
<%if forum_id =1%>
<input type="hidden" name="go_in_forum" value="date">
<%endif%>

i would save the date when last login

is this possible?

thanks hoefti
linktobuy Web Directory
Ratgeber Recht
Quote Reply
Re: [hoefti] how to make an insert in User Table In reply to
If I understand correctly, it might be best to create a global code variable that does the update, then use:

Code:
<%if forum_id = 1%><%update_user($current_user_id)%><%endif%>

The update_user global would look something like:

Code:
sub { my $user_id = shift; $DB->table('User')->update({ some_column => time }, { user_id => $user_id }); return }

The update_user global will only be called when forum_id is '1'.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] how to make an insert in User Table In reply to
Hello Jagerman

Thanks, its works

greeting hoefti
linktobuy Web Directory
Ratgeber Recht