Jump to content

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

   

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.