raffovi wrote:
How??
Can you tell me sometring more?
Thanks
Raffo
Well, I don't know what are you calling a procedure. Let me guess it is
a piece of code (Groovy for instance) embedded in a XWiki document. It
must be edited by an user having programming rights. Then, any user
accessing this document will get the same result.
<%
import groovy.sql.Sql
db = Sql.newInstance("jdbc:mysql://hostname/databasename", "username",
"password", "com.mysql.jdbc.Driver")
List samplesIA = db.rows('SELECT * FROM saltmines s where es like "I"
and ess like "A" and ids>=1')
%>
n: <% println "${samplesIA.size()}"%>
For instance, this simple Groovy script will return the number of rows
in the SQL query passed to the db.rows function only if it is edited and
saved by an user having programming rights (and provided the right host,
username, password and JDBC library are in place). If the document
containing this code is edited by any other user without those rights,
the code won't be executed.
There are tones of much better examples and useful pieces of code in the
XWiki site.
HTH,
Ricardo
--
Ricardo RodrÃguez
Your EPEC Network ICT Team