Re: [nyphp-talk] Inserting duplicate SQL primary keys

2007-07-26 Thread Rahmin Pavlovic
Cliff Hirsch wrote: > Apologies if this should be in the MySQL list, but it does seem to be a > PHP-level issue. > > While testing, I just did a page refresh, which caused this action to be > repeated: > > $query_string = "INSERT INTO task_category (task_id, category_id) VALUES > ($taskId, $cat

Re: [nyphp-talk] Inserting duplicate SQL primary keys

2007-07-25 Thread Cliff Hirsch
> Seems like the real problem here is that the application itself is not > aware of which requests have been submitted already and which haven't. > Of course you could do some things to skip out the error (error > supression with @, using "insert IGNORE into ..." to prevent errors on > duplicate ke

Re: [nyphp-talk] Inserting duplicate SQL primary keys

2007-07-25 Thread Allen Shaw
Cliff Hirsch wrote: While testing, I just did a page refresh, which caused this action to be repeated: $query_string = "INSERT INTO task_category (task_id, category_id) VALUES ($taskId, $categoryId)"; $this->dbManager->DbQuery($query_string); Obviously, on the page refresh, it threw an error (D

[nyphp-talk] Inserting duplicate SQL primary keys

2007-07-25 Thread Cliff Hirsch
Apologies if this should be in the MySQL list, but it does seem to be a PHP-level issue. While testing, I just did a page refresh, which caused this action to be repeated: $query_string = "INSERT INTO task_category (task_id, category_id) VALUES ($taskId, $categoryId)"; $this->dbManager->DbQuery($