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
playground:playgrounddb [2020/07/28 16:44] adminplayground:playgrounddb [2020/12/01 08:09] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 1: Zeile 1:
 +<php>
 // load the helper plugin // load the helper plugin
 /** @var helper_plugin_sqlite $sqlite */ /** @var helper_plugin_sqlite $sqlite */
Zeile 10: Zeile 11:
  
 // initialize the database connection // initialize the database connection
-if(!$sqlite->init('struct',DOKU_PLUGIN.'struct/db/')){+if(!$sqlite->init('pf2wiki',DOKU_PLUGIN.'starocotes')){
     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_aktion");
  
 $arr = $sqlite->res2arr($res); $arr = $sqlite->res2arr($res);
-print_r($val); 
-   
-//foreach($arr => $val) 
-//{ 
-//  print_r($val); 
-//} 
  
 +foreach ($arr as $val)
 +{
  
-<php>+var_dump($val);
  
-// load the helper plugin 
-/** @var helper_plugin_sqlite $sqlite */ 
- 
-$sqlite = plugin_load('helper', 'sqlite'); 
- 
-if(!$sqlite){ 
-    msg('This plugin requires the sqlite plugin. Please install it', -1); 
-    return; 
 } }
- 
-// initialize the database connection 
-if(!$sqlite->init('struct',DOKU_PLUGIN.'struct/db/')){ 
-    return; 
-} 
-// 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"); 
- 
-$arr = $sqlite->res2arr($res); 
-print_r($val); 
-   
-//foreach($arr => $val) 
-//{ 
-//  print_r($val); 
-//} 
  
 </php> </php>
- 
- 
- 
playground/playgrounddb.1595972688.txt.gz · Zuletzt geändert: 2020/12/01 08:09 (Externe Bearbeitung)