Wiki source code of Team
Version 20.1 by Ricardo Julio Rodríguez Fernández on 2024/01/20 10:15
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{sortable_tables filterable="yes" sticky="yes"/}} | ||
2 | |||
3 | {{groovy}} | ||
4 | import groovy.sql.Sql | ||
5 | |||
6 | def sql = new Sql(services.component.getConnection()) | ||
7 | |||
8 | println "|=num|=Pid|= Surname|= Name|= Category" | ||
9 | sql.execute "SET @row_number = 0" | ||
10 | sql.rows("SELECT (@row_number:=@row_number + 1) AS num,PersonnelID,Surname,Name,Category FROM IGFAE_Personnel ORDER BY Surname").each{ | ||
11 | println "|${it.num}|${it.PersonnelID}|${it.Surname}|${it.Name}|${it.Category}" | ||
12 | } | ||
13 | sql.close() | ||
14 | |||
15 | {{/groovy}} |