PHP Handling Errors

Поиск
Список
Период
Сортировка
От Mag Gam
Тема PHP Handling Errors
Дата
Msg-id 1cbd6f830510301521u6348ebb8j137ee1f4b1a5f2b5@mail.gmail.com
обсуждение исходный текст
Список pgsql-novice
Using PHP I get this message when trying to against my UNIQUE constraint.

Warning: pg_query(): Query failed: ERROR: duplicate key violates
unique constraint "category_name_key" in foo.php on line 12

Instead of this message, I would like something like this:

a popup button comes up and says, "This already exists". I guess I can
use Java script or something.

But is it possible to write a sql function to handle this?

TIA!

В списке pgsql-novice по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Route to backend
Следующее
От: "Christian Hofmann"
Дата:
Сообщение: PL/pgSQL Trigger - Variable for shema? Like TG_RELNAME