src/snac/server/database/SQL.php
/**
     * Insert a new privilege.
     *
     * Insert a new privilege and return the privilege's id.
     *
     * @param string $label Privilege label
     *
     * @param string $description Privilege description
     *
     * @return integer Privilege id
     */
Insert a new privilege.
Insert a new privilege and return the privilege's id.

@param string $label Privilege label

@param string $description Privilege description

@return integer Privilege id
Insert a new privilege . Insert a new privilege and return the privilege ' s id . @param string $label Privilege label @param string $description Privilege description @return integer Privilege id
public function insertPrivilege($label, $description)
    {
        $result = $this->sdb->query("insert into privilege (label, description) values ($1, $2) returning id",
                          array($label, $description));
        $row = $this->sdb->fetchrow($result);
        return $row['id'];
    }
public function insertPrivilege ( $ label , $ description ) { $ result = $ this -> sdb -> query ( " insert into privilege (label, description) values ($1, $2) returning id " , array ( $ label , $ description ) ) ; $ row = $ this -> sdb -> fetchrow ( $ result ) ; return $ row [ 'id' ] ; }
Insert a new privilege.
Insert a new privilege .