Jump to content

open/constant connection? (Not sure where to post this.)


this.user

Recommended Posts

is there a way to create an open connection on a webpage?

 

for example the page  would show the items and quantity that comes from a table called products in a database. And each time the table is updated, the content of the page would change as well. I do not want to have to call the database every minute, rather have it automatically update when the data in the database is changed.

This would not be done with php. JQuery refresh might work, where it calls an external php page, and inputs the data into a div. Though that'll refresh over a number of seconds you choose. Not when its changed.

 

Though if the user has JS turned off, it wont work at all. Not even put input in. So...

I definately agree with Teddy here, realistically you cant check the database for changes without actually querying the database.  You can get a pretty seamless look by using an AJAX/Jquery refresh, anything else would look just too awkward with the page refreshing as with AJAX you can get only the content of the page itself to refresh, and depending on the formatting of the page, any external systems you are using, and the size of the query results, this can be done lightning fast, so that you or other views almost cant tell.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.