Repeating Script....is it realistic online?
I have implemented a script on a flash site I am developing which calls a php script to check the database for a field in a table that is called "status"....this is a value of either 1 or 0, 0 being offline and 1 being online.
If the value of status is 1 it shows the names of all members with records in database that are online (when a user logs on a flash script via php updates their record status to 1 and when they log out it sets it to 0).
Basically this is done by a script continuously calling a php script checking all the records with a
$query = "SELECT * FROM customers WHERE online = 1 ORDER BY ID DESC";
This script is being called all the time because a movie clip continuously looping with 3 frames processes this and updates the members online list.
What I want to know is, is this realistic and efficient in an online environment.
With the php script called all the time, is it going to slow things down or take a lot of bandwidth, cause me any problems with server or anything when other php scripts are running alongside it.
If so is there any better way to do it?