Jump to content

Recommended Posts

I am sure this is around somewhere but not sure what to search for to find it.

 

I have a table I update often and want to run a mysql query to update it. though sometimes the file I update from has new entries, I would like to add these entries if there is nothing there with a matching customer id.

 

So should be something like

 

if customer id matches one in file - update that record

if not - insert new record

 

also would like to know if there is a way mysql (within the same query as above) would notice how many of the records haven't been updated (because they have been taken away from the file I update from) and maybe mark a new field to point out to me that I have not updated it with last update.

 

cheers

Link to comment
https://forums.phpfreaks.com/topic/74128-simple-mysql-question/
Share on other sites

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.