unidox Posted November 21, 2007 Share Posted November 21, 2007 Is there anyway I can have a live update of sql. So when someone adds a new user to the db in a popup, after they press submit, it updates the sql info that is being printed, every x seconds. So its like a live feed. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 9, 2007 Share Posted December 9, 2007 In Theory: you could create a php script with a mysql_num_rows and have your ajax script query it onload (then store the query results to a javascript/ajax variable) and re-query it ever X number of seconds/minutes. have it compare your original mysql_num_rows javascript/ajax variable with the updated mysql_num_rows query results and if it exceeds the original mysql_num_rows javascript/ajax variable; have your ajax script update the http.responseText. But this is just my theory; I have never tested this before, so I cannot guarantee it will work - but maybe. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.