[nycphp-talk] Insert updating instead of inserting
Dan Cech
dcech at phpwerx.net
Fri Sep 30 19:00:46 EDT 2011
Bruce,
> I have an issue I hope someone can help me figure out. We have a Mysql database
> two php processes that insert new records into a table. There should never be a
> time when these processes update a record they should only insert a new one.
> These processes run simultaneously one running from a cron job and the other
> running when requested is made via an ajax call.
>
> For some reason when each process is working at the same time It seems to not
> insert a new record but update a similar record. I am explicitly calling insert
> and I do not include the primary_key id in the insert statement.
Can you post the output from SHOW CREATE TABLE and an example of the
queries you're running?
Also, please don't create a new topic by hitting reply and changing the
subject, it breaks threading in most mail clients.
Dan
More information about the talk
mailing list