Hello.

I use this code-snip similar to this to check if the inserted tuppel in my 
database was successfull:
--- snip ---
$OID = pg_last_oid($resultat);
        if($OID<0) {
        echo $errormessage;
        exit;
        }
$query = "SELECT * FROM medlemmer WHERE oid = '$OID';";
$resultat = pg_query($dbconnection, $query);

if (!$resultat) {
        echo $errormessage;
        exit;
} else {
        $i = 0;
        $medlem_id[$i] = pg_fetch_result($resultat, $i, "medlem_id");
        $fornavn[$i] = pg_fetch_result($resultat, $i, "fornavn");
}
pg_free_result($resultat);
if (!$medlem_id[$i]) {
        echo $errormessage;
        exit;
} else {
        $i = 0;
        echo $medlem_id[$i].$fornavn[$i];
}
--- snip ---

But when I print the result from pg_fetch_result() to the browser (last 
lines above), I only get the first letter in the string $fornavn[$i] and 
similar strings not listed above, not the whole string. What is the reason 
for this? Has it something to do with the pg_last_oid()? I can't see how 
since this only identify the inserted row (or am I wrong?) which I select 
afterwards.

Thanks for answer.

Bård Magnus


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to