Connecting Tech Pros Worldwide Help | Site Map

real time sql query

  #1  
Old August 24th, 2007, 11:05 PM
flashvarss
Guest
 
Posts: n/a
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

  #2  
Old August 25th, 2007, 12:05 AM
Toby A Inkster
Guest
 
Posts: n/a

re: real time sql query


flashvarss wrote:
Quote:
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/
  #3  
Old August 25th, 2007, 08:05 PM
Steve
Guest
 
Posts: n/a

re: real time sql query


| 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'.


  #4  
Old August 26th, 2007, 07:45 AM
flashvarss
Guest
 
Posts: n/a

re: real time sql query


On Aug 25, 10:04 pm, "Steve" <no....@example.comwrote:
Quote:
| 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?

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update the sql query data in the background silently? WuBin answers 2 August 21st, 2008 07:15 PM
Find Active Queries in real-time elimeli1 answers 0 March 16th, 2008 10:24 AM
real time status =?Utf-8?B?TWljaGFlbCBkZSBWZXJh?= answers 5 February 23rd, 2007 09:25 AM
Monitoring SQL query packets in real time Sosh123 answers 2 November 19th, 2005 01:31 PM