Benutzer-Werkzeuge

Webseiten-Werkzeuge


playground:playgrounddb

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige ÜberarbeitungVorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
Nächste ÜberarbeitungBeide Seiten, nächste Überarbeitung
playground:playgrounddb [2020/07/28 16:42] adminplayground:playgrounddb [2020/07/29 03:57] admin
Zeile 1: Zeile 1:
 +<wrap notice>Test</wrap> <wrap notice>noch was</wrap>
 <php> <php>
 // load the helper plugin // load the helper plugin
 /** @var helper_plugin_sqlite $sqlite */ /** @var helper_plugin_sqlite $sqlite */
 +
 $sqlite = plugin_load('helper', 'sqlite'); $sqlite = plugin_load('helper', 'sqlite');
 +
 if(!$sqlite){ if(!$sqlite){
     msg('This plugin requires the sqlite plugin. Please install it', -1);     msg('This plugin requires the sqlite plugin. Please install it', -1);
     return;     return;
 } }
 +
 // initialize the database connection // initialize the database connection
 if(!$sqlite->init('struct',DOKU_PLUGIN.'struct/db/')){ if(!$sqlite->init('struct',DOKU_PLUGIN.'struct/db/')){
     return;     return;
 } }
 +
 // use the plugin // use the plugin
-$res = $sqlite->query("select * from data_talent left join (select rid, count(*) as zahl from multi_talent where value In ("Abstammung","Elf") group by rid) as m on data_talent.rid = m.rid where zahl = 2");+$res = $sqlite->query("select * from data_talent left join (select rid, count(*) as zahl from multi_talent where value In ('Abstammung','Elf') group by rid) as m on data_talent.rid = m.rid where zahl = 2"); 
 $arr = $sqlite->res2arr($res); $arr = $sqlite->res2arr($res);
-  print_r($val); + 
-   +foreach ($arr as $val) 
-//foreach($arr => $val) +
-//{ + 
-//  print_r($val); +  // use the plugin 
-//}+  $res2 = $sqlite->query("select * from multi_talent where colref = 5 and rid = ".$val['rid']); 
 + 
 +  $arr2 = $sqlite->res2arr($res2); 
 + 
 +  foreach ($arr2 as $val2) 
 +  { 
 +     $cat = ''; 
 +  } 
 +print('<div class="wrap_box plugin_wrap">'); 
 +print('<p>'); 
 +print('<strong>'.$val['col1'].'</strong>'); 
 +print(' <img src="/lib/exe/fetch.php?media='.$val['col6'].'" class="media" alt="" /> <strong>'.$val['col7'].'</strong><br/>'); 
 +if($val['col4'] !== ''
 +
 +print('<strong>Voraussetzungen:</strong'.$val['col4'].'<br/>'); 
 +
 + 
 +if($val['col8'] !== ''
 +
 +print('<strong>Häufigkeit:</strong> '.$val['col8'].'<br/>'); 
 +
 + 
 +if($val['col10'] !== ''
 +
 +print('<strong>Auslöser:</strong> '.$val['col10'].'<br/>'); 
 +
 + 
 +print('<br/>'.$val['col2'].'<br/>'); 
 + 
 +if($val['col12'] !== ''
 +
 +print('<strong>Kritischer Erfolg:</strong> '.$val['col12'].'<br/>'); 
 +} 
 + 
 +if($val['col13'] !== ''
 +
 +print('<strong>Erfolg:</strong> '.$val['col13'].'<br/>'); 
 +
 + 
 +if($val['col14'] !== ''
 +
 +print('<strong>Fehlschlag:</strong> '.$val['col14'].'<br/>'); 
 +
 + 
 +if($val['col15'] !== ''
 +
 +print('<strong>Kritischer Fehlschlag:</strong> '.$val['col15'].'<br/>'); 
 +
 + 
 +print('</p>'); 
 +print('</div>'); 
 + 
 +
 </php> </php>
playground/playgrounddb.txt · Zuletzt geändert: 2020/12/01 08:09 von 127.0.0.1