Question
Hallo!
I am stuck with an
DatabasePlugin error with "DATABASE_SQL_REPEAT".
The apache error.log says: [Sun Nov 2 13:21:21 2003] view: Use of uninitialized value in substitution iterator at ../lib/TWiki/Plugins/DatabasePlugin.pm line 581.
line 581 is:
$_[0] =~ s/%DATABASE_SQL_REPEAT{(.*?)}%(.*?)%DATABASE_SQL_REPEAT%/&do_sql_repeat($1, $2)/seog;
I call the Plugin:
%DATABASE_SQL_REPEAT{description="bilder" command="SELECT bi_name, bi_verzeichnis,bi_beschreibung FROM bilder WHERE bi_todo = true"}% | %bi_name% | %bi_verzeichnis% | %bi_beschreibung% | %DATABASE_SQL_REPEAT%.
I tried to modify the REGEX by adding some "\", but nothing helped.
The alternative call with "DATABASE_SQL_TABLE" works fine, but I want to use the user formatted output.
Can someone help?
Do I have a problem with all the "*_REPEAT" calls?
"%DATABASE_REPEAT{description="sprachen" columns="sp_id,sp_name"}%| %sp_id%
%sp_name% | %DATABASE_REPEAT%" yields following output:
| 1 dt | | 2 engl | | 3 franz | | 4 ital |
Is that really the way it should look like? I expected a TWiki table...
testenv output:
http://www.8ung.at/susanne.ruppel/twiki/testenv.html
DatabasePlugin.pm.txt:
http://www.8ung.at/susanne.ruppel/twiki/DatabasePlugin.pm.txt
(I've made some slight modifications to make it work for
PostgreSQL, but not everything works fine, yet).
Thank You!
Susanne
Environment
--
SusanneRuppel - 02 Nov 2003
Answer