Hi.
> I want to get the ID (auto increment) of my last INSERT using
> something similar to
> the php function mysql_insert_id()
>
> $lastInsertedID = mysql_insert_id();
>
> Can this be done using the standard Symfony data abstraction classes
> Propel & Criteria? If so how do you do it?
Sure:
$
Hello,
It may be what you want:
$dbAdap = new DBMySQL();
$con = Propel::getConnection(PhonePeer::DATABASE_NAME);
$dbAdap->lockTable($con, "table1");
$t1 = new Table1();
$t1->setNumber($number);
$t1->save();
$last_id = $t1->getPrimaryKey();
$dbAdap->unlockTable ($con, "table");
echo $las
$item = new Item;
$item->setName('foo');
$item->setContent('bar');
$item->save();
$item->getId();
On Jun 22, 9:20 pm, slinky66 <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to get the ID (auto increment) of my last INSERT using
> something similar to
> the php function mysql_insert_id()
>
> $l