I have a caching script that requests a bunch of data from a SOAP API using PHP (Cron job every 5 minutes). This script requests and stores a customer id and name.
The table that the API information is stored in has 3 columns:
'id' = int, Primary_key
'name' = varchar(255)
'paying' = bool
There is around 10 (in 80) customers with the bool paying set to true. However, every once in a while the all customer's paying columns revert to 0.
So... Can the following query cause the paying column to change under any circumstances?
INSERT INTO customer(`id`, `name`) VALUES ('$escapedId','$escapedName') ON DUPLICATE KEY UPDATE `name`='$escapedName'
idcolumn is the primary key, the columnsidandnameare provided by the API.