Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jan 2011
    Posts
    75
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Message system problem

    Hi, I'm having an issue. I'm making a message system. Can someone please help me correct this. If you need my database prefixes, I'll give you them through private message.

    This is what it currently looks like.



    But I want it to look like this.



    This is my code.


  • #2
    Regular Coder Redcoder's Avatar
    Join Date
    May 2012
    Location
    /dev/null
    Posts
    333
    Thanks
    2
    Thanked 47 Times in 46 Posts
    I don't see anything. Do check your thread to add what you intended.

  • #3
    Regular Coder
    Join Date
    May 2007
    Posts
    100
    Thanks
    16
    Thanked 11 Times in 11 Posts
    Those images are attachments, for some reason they aren't working.
    The CodingForums Funny Images thread ** Now with 20+ pages!! ** - http://www.codingforums.com/geek-news-humour/245405-funny-images.html

  • #4
    New Coder
    Join Date
    Jan 2011
    Posts
    75
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Sorry, some reason it wasn't working, but here are the images. If it's something to do with updating selections, please let me know because I want the messages to update. When I tested it, the number count just stays at 0.

    This is my current code for it.


    This is what it currently looks like.


    And this is what I want it to look like.

  • #5
    Regular Coder hinch's Avatar
    Join Date
    Sep 2005
    Location
    UK
    Posts
    923
    Thanks
    25
    Thanked 80 Times in 80 Posts
    try changing $UnreadMail=mysql_num_rows($UnreadMail);

    to $unreadcount = mysql_num_rows($UnreadMail);

    though thats assuming your db class works like that. does the db class not have something like $database->countOf($q);?
    A programmer is just a tool which converts caffeine into code

    My work: http://www.fcsoftware.co.uk && http://www.firstcontactcrm.com
    My hobby: http://www.angel-computers.co.uk
    My life: http://www.furious-angels.com

  • #6
    New Coder
    Join Date
    Jan 2011
    Posts
    75
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by hinch View Post
    try changing $UnreadMail=mysql_num_rows($UnreadMail);

    to $unreadcount = mysql_num_rows($UnreadMail);

    though thats assuming your db class works like that. does the db class not have something like $database->countOf($q);?
    No sorry, your code just calls the user's ID. Not updating the message count.


    -_- I feel silly. I found the answer. The reason why it wasn't updating was because recieved = 'unread'"; wasn't updating it so I changed it to recieved = '0'"; and it worked. Thanks for the help anyways.
    Last edited by xiong_ster123; 01-04-2013 at 11:20 AM. Reason: Resolved


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •