473,466 Members | 1,416 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Real-time database monitor

I have built a messaging system where users of a website can send
messages to each other and they will appear in the other users inbox
for viewing next time they log in. In a bar at the top of the page it
says "Inbox (0)" if they have no new messages and, yup, you guessed it
"Inbox (2)" if they have two waiting messages. If someone sends them
a message while they are sitting on some page of the website I would
like the counter to increase. Right now the mysql query runs each
time a page is loaded so they would be notified then but I would like
it to somehow update the inbox number while they sit on a page. Does
anyone have any ideas? Thank you in advance for your help!
Jun 2 '08 #1
2 1609
On May 7, 8:33 pm, Justin Voelker <justin.voel...@gmail.comwrote:
I have built a messaging system where users of a website can send
messages to each other and they will appear in the other users inbox
for viewing next time they log in. In a bar at the top of the page it
says "Inbox (0)" if they have no new messages and, yup, you guessed it
"Inbox (2)" if they have two waiting messages. If someone sends them
a message while they are sitting on some page of the website I would
like the counter to increase. Right now the mysql query runs each
time a page is loaded so they would be notified then but I would like
it to somehow update the inbox number while they sit on a page. Does
anyone have any ideas? Thank you in advance for your help!
I forgot to mention that each time someone sends a message it creates
a new record in a single table in the database. What I am looking for
is a way to monitor that database and find any records with "msg_to"
equal to the user id of the person logged in and "msg_unread" equal to
'1.'
Jun 2 '08 #2
Justin Voelker wrote:
I have built a messaging system where users of a website can send
messages to each other and they will appear in the other users inbox
for viewing next time they log in. In a bar at the top of the page it
says "Inbox (0)" if they have no new messages and, yup, you guessed it
"Inbox (2)" if they have two waiting messages. If someone sends them
a message while they are sitting on some page of the website I would
like the counter to increase. Right now the mysql query runs each
time a page is loaded so they would be notified then but I would like
it to somehow update the inbox number while they sit on a page. Does
anyone have any ideas? Thank you in advance for your help!
You aren't going to be able to do this unless they refresh the screen.
The browser knows nothing about changes on the server.

AJAX can help. Try comp.lang.javascript.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jun 2 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Aaron W. West | last post by:
Timings... sometimes there are almost too many ways to do the same thing. The only significant findings I see from all the below timings is: 1) Integer math is generally fastest, naturally....
2
by: cwdjr | last post by:
Real One has a page to copy on their site that detects if the browser of a viewer of a page has Real One installed. The page is located at...
6
by: Paul | last post by:
In real life situation, do we ever come across a situation where we would need two base objects in an object. A snippet is worth 1000 words (: so... class Base { }; class Derived1:public Base...
2
by: mo | last post by:
Hi We've got some numbers stored as Reals which are returning values in scientific notation that we need rounded down to 3 digits to the right of the decimal. ie 8.7499999E-2 needs to return...
4
by: Allan Adler | last post by:
I'm trying to reinstall RedHat 7.1 Linux on a PC that was disabled when I tried to upgrade from RH7.1 to RH9. This is presenting lots of unexpected difficulties. Apart from wanting to keep the old...
10
by: Pavils Jurjans | last post by:
Hallo, It is know issue that due to the fact that computer has to store the real numbers in limited set of bytes, thus causing a minor imprecision from the decimal value that likely was stored....
17
by: David Scemama | last post by:
Hi, I'm writing a program using VB.NET that needs to communicate with a DOS Pascal program than cannot be modified. The communication channel is through some file databases, and I have a huge...
0
by: support | last post by:
Veteran Real Estate Investor Shares some of his best Insider Secrets for successful investments! www.RealEstateBeginners.ws Have you ever wondered about investing in real estate? Maybe one...
16
by: DirtyHarry | last post by:
Good day everyone. This sounds like a stupid question, but I became just curious yesterday, and I looked up several textbooks. However, no textbooks on computer language (that I have ) mentioned...
2
by: Tim | last post by:
Folks, Can anyone thow some clarifying light on the following? I have come across a column with the same name and same data contents defined on different tables, on some the column is defined...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.