I am having in issue getting the lastInsertId.  I tried using it against the
stmt object and the db handle with no avail:

    $db = ezcDbInstance::get();
    $q = $db->createInsertQuery();
 $q->insertInto( 'ticket' )
    ->set( 'summary',       $q->bindValue( $input['summary'] ) )
    ->set( 'description',   $q->bindValue( $input['description'] ) )
    ->set( 'priority_id',   $q->bindValue( $input['priority'] ) )
    ->set( 'severity_id',   $q->bindValue( $input['severity'] ) )
    ->set( 'department_id', $q->bindValue( $input['department'] ) )
    ->set( 'user_id',       $q->bindValue( '1' ) )
    ->set( 'status_id',     $q->bindValue( '1' ) );
    $stmt = $q->prepare();
    $stmt->execute();

tried:

$stmt->lastInsertId();
$db->lastInsertId();

Both to no avail.

Any ideas?

Jim
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to