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($query_string);

Obviously, on the page refresh, it threw an error (DB Error: already
exists), since it was already inserted.

The question:

Where should I be checking for this? Should I just suppress the error with
@$this->dbManager->DbQuery($query_string);? Should I just do a select
before-hand to see if the join is already in the table? Other ideas?

Cliff



_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to