PhpLabWare version 0.3 
/dd/ -> 0_2002_inc.php

1  <?php
2 
3  // Translates columns access into columns gr,gw,er,ew
4 
5  unset ($rb);
6  $rb=$db->Execute("SELECT real_tablename FROM tableoftables");
7  while (!($rb->EOF)) {
8     if($rb->fields['real_tablename']) {
9        unset ($rc);
10        $rc=$db->Execute("SELECT id,access FROM {$rb->fields['real_tablename']}");
11        while ($rc && !$rc->EOF) {
12           if ($rc->fields['access']{3}=='r')
13              $gr=1;
14           else
15              $gr=0;
16           if ($rc->fields['access']{4}=='w')
17              $gw=1;
18           else
19              $gw=0;
20           if ($rc->fields['access']{6}=='r')
21              $er=1;
22           else
23              $er=0;
24           if ($rc->fields['access']{7}=='w')
25              $ew=1;
26           else
27              $ew=0;
28           $db->Execute("UPDATE {$rb->fields['real_tablename']} SET gr=$gr,gw=$gw,er=$er,ew=$ew WHERE id={$rc->fields['id']}");
29           $rc->MoveNext();
30        }
31     }
32     $rb->MoveNext();
33  }


Generated: Sun Oct 5 21:17:35 2003 SourceForge Logo Generated by PHPXref 0.2