YAFLogo

lucauwf76
  • lucauwf76
  • 65% (Friendly)
  • YAF Forumling Topic Starter
14 years ago
Hi guys,

I have some code for obtaining the number of PMs a user has (pmessage_list query) and display this number on his home page (not the forum).
I wanted to display the number of messages that are unread too and assumed this would be a flag, however judging by the source this isn't the case.

Could someone point me in the right direction please?

Thanks
Sponsor

lucauwf76
  • lucauwf76
  • 65% (Friendly)
  • YAF Forumling Topic Starter
14 years ago
OK - found the time to check the stored procedures of the DB and came up with:

DataTable pms = YAF.Classes.Data.DB.pmessage_info();

int numread = (int)pms.Rows[0]["NumRead"];
int numunread = (int)pms.Rows[0]["NumUnread"];
int numtotal = (int)pms.Rows[0]["NumTotal"];


Does the job. 🙂
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button