Changeset 1166

Show
Ignore:
Timestamp:
11/18/08 17:26:01 (2 months ago)
Author:
laurentj
Message:

ticket #738: error with postgresql and lastInsertId in the aclgroup command.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0.x/lib/jelix-scripts/commands/aclgroup.cmd.php

    r1019 r1166  
    113113 
    114114        $cnx->exec($sql); 
    115         $id = $cnx->lastInsertId(); 
     115        $id = $cnx->lastInsertId('jacl_group_id_aclgrp_seq'); // name of the sequence for pgsql 
    116116        echo "OK. Group id is: ".$id."\n"; 
    117117    } 
  • trunk/lib/jelix-scripts/commands/acl2group.cmd.php

    r1165 r1166  
    184184 
    185185        $cnx->exec($sql); 
    186         $id = $cnx->lastInsertId(); 
     186        $id = $cnx->lastInsertId('jacl2_group_id_aclgrp_seq'); // name of the sequence for pgsql 
    187187        echo "OK. Group id is: ".$id."\n"; 
    188188    } 
     
    308308        $sql.=$login.',2, '.$login.')'; 
    309309        $cnx->exec($sql); 
    310         $id = $cnx->lastInsertId(); 
     310        $id = $cnx->lastInsertId('jacl2_group_id_aclgrp_seq'); // name of the sequence for pgsql 
    311311 
    312312        $sql="INSERT INTO jacl2_user_group (login, id_aclgrp) VALUES(".$login.", ".$id.")"; 
  • trunk/lib/jelix-scripts/commands/aclgroup.cmd.php

    r1165 r1166  
    113113 
    114114        $cnx->exec($sql); 
    115         $id = $cnx->lastInsertId(); 
     115        $id = $cnx->lastInsertId('jacl_group_id_aclgrp_seq'); // name of the sequence for pgsql 
    116116        echo "OK. Group id is: ".$id."\n"; 
    117117    } 
Download in other formats: Unified Diff Zip Archive