Jump to content

AJAX mysql table update and refresh


envexlabs

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/60256-ajax-mysql-table-update-and-refresh/
Share on other sites

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

   

 

 

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.