473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

real time sql query

Hi,
I am making a web-based chat but to get the msg from the database i
need to refresh the page and that will make load and extra bandwidth
on the server so i want to make the query in real time ( only the new
msg to be received without refresh the whole page ), Any one in here
knows how to get data from sql database without having to refresh
page?
thanks all for your time

Aug 24 '07 #1
3 2876
flashvarss wrote:
Any one in here knows how to get data from sql database without having
to refresh page?
Other than periodically refreshing the page, you have two options:

1. Using AJAX to continuously poll the server;
2. The "multipart/x-mixed-replace" MIME type;
3. Server-sent events <http://labs.opera.com/news/2006/09/01>.

A page refresh will offer the widest range of browser support. AJAX will
work in any reasonably modern browser with Javascript enabled. Multipart/
X-Mixed-Replace is an old Netscape 1.x push technology, which is still
supported in Gecko-based browsers, plus Opera and Safari, but not Internet
Explorer. Server-sent events, although the neatest solution are only
supported by one browser so far -- Opera 9.x -- expect wider browser
support in the future.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 65 days, 2:30.]

TrivialEncoder/0.2
http://tobyinkster.co.uk/blog/2007/0...ivial-encoder/
Aug 24 '07 #2
| AJAX and other html-based solutions are heavy, ugly and incompatible.
|
| Why don't you simply use flash?

because flash sux.

hmmm...ajax is 'heavy' and 'ugly'. care to quantify and qualify? oh, and
ajax says, 'whatever you say bounces of me and sticks to you'.
Aug 25 '07 #3
On Aug 25, 10:04 pm, "Steve" <no....@example.comwrote:
| AJAX and other html-based solutions are heavy, ugly and incompatible.
|
| Why don't you simply use flash?

because flash sux.

hmmm...ajax is 'heavy' and 'ugly'. care to quantify and qualify? oh, and
ajax says, 'whatever you say bounces of me and sticks to you'.
But i want something very fast, example of magma chat server ( you
cant find it now ), its a frame based chat that is very fast to load,
the body of it

body.html - this is the streaming chat frame where the chat will
pop up as people post it. This is done through the
use of a special HTTP header declaring it as a
chunked data transfer...i think (but dont know)

How is that can be done?

Aug 26 '07 #4

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

Similar topics

0
by: John R | last post by:
I found this old thread while looking for some type of compression solution myself. Long story short, I contacted Lester and ended up writing an LZO solution just as Mark had mentioned below....
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....
1
by: Evan Smith | last post by:
My database is suffering from poor performance of late. Reports that used to run in a reasonable time, now take a while. The explain output show that the query is fully indexed, and the statistics...
2
by: Sosh123 | last post by:
Hi, I was wondering if there is a way with VS.NET and SQLsvr/MSDE to monitor query activity in real time whilst I am debugging an ASP.NET application. I want to see when queries are made to the...
30
by: Raymond Hettinger | last post by:
Proposal -------- I am gathering data to evaluate a request for an alternate version of itertools.izip() with a None fill-in feature like that for the built-in map() function: >>> map(None,...
11
by: Mike9900 | last post by:
How can I get the real system date/time if the user fakes the date, for example by setting the system date back. -- Mike
5
by: =?Utf-8?B?TWljaGFlbCBkZSBWZXJh?= | last post by:
To all, Not sure on how to approach this but what would be the best practice in showing status of a query that does an aggregation or count of some sort. if I were to have a sql statement that...
6
by: mattdaddym | last post by:
Hi all, I'm looking for a way to show my users the progress of their sql queries. I've implemented Microsoft Ajax in order to show a progress bar, but I would love to be able to show: number...
6
by: Pete Kane | last post by:
Hi All, does anyone know a site that I can query share prices programmatically ( possibly passing in a stock symbol )?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...

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.