Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

jforum_user.user_lastvisit is never updated

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All is in title

See UserModel.update in generic_queries.sql and public void update(User user) in GenericUserDAO.java

Modifying in generic_queries.sql :
UserModel.update = UPDATE jforum_users SET user_aim = ?, \
user_avatar = ?,\
gender = ?, \
themes_id = ?,\
user_allow_pm = ?, \
user_allowavatar = ?, \
user_allowbbcode = ?, \
user_allowhtml = ?, \
user_allowsmilies = ?, \
user_email = ?, \
user_from = ?, \
user_icq = ?, \
user_interests = ?, \
user_occ = ?, \
user_sig = ?, \
user_website = ?, \
user_yim = ?, \
user_msnm = ?, \
user_password = ?, \
user_viewemail = ?, \
user_viewonline = ?, \
user_notify = ?, \
user_attachsig = ?, \
username = ?, \
user_lang = ?, \
user_notify_pm = ?, \
user_biography = ?, \
user_lastvisit = ?, \
WHERE user_id = ?

In GenericUserDAO.java :
public void update(User user) throws Exception
.
.
.
// REDHAND MOD
// p.setInt(28, user.getId());
p.setTimestamp(28, new Timestamp(user.getLastVisit().getTime()));
p.setInt(29, user.getId());

but LastVisit should be set before ... more soon

[originally posted on jforum.net by redhand]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

I added your fix to the cvs

Rafael
[originally posted on jforum.net by Rafael Steil]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!