> $id = "SELECT currval('cust_id')"; // used in an
> attempt to get last id (colum 'cust id')entered into
> $result = $db->Execute($sql); // works fine.
> $id_result = $db->execute($id); // $id_result has no
This is because currval fetched data during a transaction process and
not after the process is complete.
the best way I suggest is
$id = "SELECT cust_id from customer where customer_name ='$cust'
order by cust_id desc limit1" ; // used in an
With Best Regards,
Lead Software Developer,
In response to
pgsql-novice by date
|Next:||From: operationsengineer1||Date: 2005-01-31 19:36:11|
|Subject: Re: Last ID Problem|
|Previous:||From: operationsengineer1||Date: 2005-01-31 19:13:58|
|Subject: Last ID Problem|
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2005-01-31 19:26:24|
|Subject: Re: Allow GRANT/REVOKE permissions to be applied to all schema objects with one command |
|Previous:||From: Victor Yegorov||Date: 2005-01-31 19:15:59|
|Subject: Combining index scans|