Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-31-2012, 11:20 PM   PM User | #1
xiong_ster123
New Coder

 
Join Date: Jan 2011
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
xiong_ster123 is an unknown quantity at this point
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.

xiong_ster123 is offline   Reply With Quote
Old 01-01-2013, 08:18 PM   PM User | #2
Redcoder
Regular Coder

 
Redcoder's Avatar
 
Join Date: May 2012
Location: /dev/couch
Posts: 309
Thanks: 2
Thanked 46 Times in 45 Posts
Redcoder has a little shameless behaviour in the past
I don't see anything. Do check your thread to add what you intended.
__________________
For professional Hosting and Web design.....


NetEssentials.co.uk
Redcoder is offline   Reply With Quote
Old 01-01-2013, 09:04 PM   PM User | #3
>ssp-cdr<
Regular Coder

 
Join Date: May 2007
Posts: 100
Thanks: 16
Thanked 11 Times in 11 Posts
>ssp-cdr< is an unknown quantity at this point
Those images are attachments, for some reason they aren't working.
__________________
The CodingForums Funny Images thread - http://www.codingforums.com/showthread.php?t=245405
>ssp-cdr< is offline   Reply With Quote
Old 01-04-2013, 02:33 AM   PM User | #4
xiong_ster123
New Coder

 
Join Date: Jan 2011
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
xiong_ster123 is an unknown quantity at this point
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.
xiong_ster123 is offline   Reply With Quote
Old 01-04-2013, 09:27 AM   PM User | #5
hinch
Regular Coder

 
hinch's Avatar
 
Join Date: Sep 2005
Location: UK
Posts: 921
Thanks: 25
Thanked 79 Times in 79 Posts
hinch is on a distinguished road
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
hinch is offline   Reply With Quote
Old 01-04-2013, 10:17 AM   PM User | #6
xiong_ster123
New Coder

 
Join Date: Jan 2011
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
xiong_ster123 is an unknown quantity at this point
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
xiong_ster123 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:52 PM.


Advertisement
Log in to turn off these ads.