From: Carol Walter
Date: May 18, 2009 4:12:16 PM GMT-04:00
To: danaketh
Subject: Re: [PHP-DB] Assigning the current value of a sequence to a
variable - Postgres 8.3.6
Hello,
Oh, of course. Sorry for the silly question.
Thanks for your help.
Carol
On May 18, 2009, at 3:45 PM
Hello,
you're not fetching the query results.
$query = "SELECT currval('\"tblPeople_peopleId_seq\"')";
$result = pg_query($query) or die("Can't execute 4th query");
if ($result != false) {
$row = pg_fetch_row($result);
echo "person id is " . $row[0] . "";
}
Hello,
I have a program that looks for a name in a database. If the name is
found the id of the record is assigned to a variable. Later in the
program that value is used to insert records associated with the name
into the database using a variable called person_id. If the name is
not f