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. Link to comment https://forums.phpfreaks.com/topic/78248-update/ 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. Link to comment https://forums.phpfreaks.com/topic/78248-update/#findComment-410317 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.