doctrine
Error in Geographical Template - input is out of range - Doctrine / Symfony
Submitted by nei on Thu, 02/25/2010 - 14:55If you are using the getDistance method provided by Geogrphical Template in Doctrine and got this error:
500 | Internal Server Error | Doctrine_Connection_Pgsql_Exception
SQLSTATE[22003]: Numeric value out of range: 7 ERROR: input is out of range
You probably have the same problem that I got today..
How to get the lastinsertid Doctrine
Submitted by nei on Tue, 07/07/2009 - 16:45This example show how you can get the latest insert id on table continent.
$dbh = Doctrine_Manager::getInstance()->getCurrentConnection();
$sth = $dbh->prepare("INSERT INTO continent (created_at, updated_at) VALUES ( NOW(), NOW() )");
$sth->execute();
$conn = Doctrine_Manager::getInstance()->getCurrentConnection();
$conn->lastInsertId('continent_id');
