#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    2
    Rep Power
    0

    Question trapping postgresql error in php


    Is it possible to trap errors returned from postgresql using php. Specifically I want to trap a constraint violation.

    thanks for any info.

    Jason
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    Please, do not x-post. Ask in only one forum.

    To get the error returned from a pg query in php you use pg_last_error(). I suggest you read the Postgres section of the PHP manual.

IMN logo majestic logo threadwatch logo seochat tools logo