Re: [GENERAL] What does this mean ? - Mailing list pgsql-general

From Mario Jorge Nunes Filipe
Subject Re: [GENERAL] What does this mean ?
Date
Msg-id 3773A7D9.895D6064@neptuno.uevora.pt
Whole thread Raw
In response to What does this mean ?  (Mario Jorge Nunes Filipe <mjnf@neptuno.sc.uevora.pt>)
Responses Re: [GENERAL] What does this mean ?  (M Simms <grim@argh.demon.co.uk>)
Re: [GENERAL] What does this mean ?  (Adam Haberlach <haberlaa@ricochet.net>)
Re: [GENERAL] What does this mean ?  (Remigiusz Sokolowski <rems@gdansk.sprint.pl>)
List pgsql-general
Thomas Reinke wrote:
>
> You have already started a transaction and haven't yet
> finished it.
>
> E.g.
>
> psql template;
> BEGIN;
> BEGIN;

    Not that i don't believe you but i think that in my case that is a tid
bit impossible. The error comes from a php script. On that script i open
the connection, then i do a select and then the begin. So there isn't
anyother begin. I've tryed to run an abort before that but it still
doen't return a result, althoug there is no message error either.

    I really need help here, because i really need this thing working with
transactions. Just in case here is the code:

pg_Exec($conn, "abort");
$result = @pg_Exec($conn, "begin");
if (!$result);
  $msg ="sac-pcgra (2):".addslashes(pg_ErrorMessage($conn));
  $msg = chop($msg);
  echo "<script>alert(\"$msg\");history.go(-1)</script>";
  pg_Close($conn);
  exit;
}


When running this i always get an alert box saying "sac-pcgra(2):".

What is wrong?

Thanks

--
        Mario Filipe
        mjnf@uevora.pt
        http://neptuno.sc.uevora.pt/~mjnf

Attachment

pgsql-general by date:

Previous
From: A James Lewis
Date:
Subject: Re: [GENERAL] Questions regarding OID
Next
From: Karl DeBisschop
Date:
Subject: Re: [GENERAL] Questions regarding OID