envexlabs Posted July 16, 2007 Share Posted July 16, 2007 Hey, I have a section that lists out products. Right now, i have the mysql query that grabs all the products, and the AJAX updates the database and resubmits the same mysql query. I know this isn't the best way to go about it, and it's generating duplicate mysql tables in the process. Is there a way to make AJAX execute the mysql query, and then refresh the mysql query? Quote Link to comment https://forums.phpfreaks.com/topic/60256-ajax-mysql-table-update-and-refresh/ Share on other sites More sharing options...
RichardRotterdam Posted July 19, 2007 Share Posted July 19, 2007 Only thing you need to do is first execute an insert query on your ajaxpage and then do a select querry when its done that echo's the desired new content to show. main page external ajax page -ajax call to external page -refresh content onready state -INSERT INTO query -SELECT FROM query Quote Link to comment https://forums.phpfreaks.com/topic/60256-ajax-mysql-table-update-and-refresh/#findComment-302898 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.