Jump to content

Simple mysql question


SetToLoki

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

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.