stats2 - $q = mysql_query("SELECT id FROM...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
<?php include 'tribaldb.php'; session_start(); if($_GET['p']!="admin"){ exit(); } $x=0; echo "<link rel=stylesheet href=/css/main_gecko.css type=text/css />"; e $qu = mysql_query("SELECT department FROM users"); $x=0; $i=2; //$ar[0]="3"; while($s = mysql_fetch_row($qu)){ w //echo $ar[0]; w if((strtoupper($s[0])==strtoupper($dept[$x])) || ($s[0]==100) || ($s[0]=="N/A")){ $i=0; } $x++; } if($i==2){ $dept[count($dept)]=$s[0]; $i=0; } $x=0; $i=2; $ } $qu = mysql_query("SELECT agency FROM users"); $x=0; $i=2; //$ar[0]="3"; while($s = mysql_fetch_row($qu)){ w //echo $ar[0]; w if((strtoupper($s[0])==strtoupper($agency[$x])) || ($s[0]==100) || ($s[0]=="N/A")){ $i=0; } $x++; } if($i==2){ $agency[count($agency)]=$s[0]; $i=0; } $x=0; $i=2; $ }
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
} echo " <Table width=100%> <TR valign=top align=center> <td> <TABLE WIDTH=200 CELLSPACING=0 CELLPADDING=5> <TR> <td>Department</td> <td>Amount Registerd</td> <td>Amount Completed</td> </TR>"; while($x<count($dept)){
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: $q = mysql_query(&quot;SELECT id FROM users WHERE department='$dept[$x]'&quot;); $amount = mysql_num_rows($q); $r = mysql_query(&quot;SELECT id FROM users WHERE department='$dept[$x]' AND locked='1'&quot;); $amountdone = mysql_num_rows($r); $ echo &quot; &lt;TR&gt; &lt;td&gt;&quot;.$dept[$x].&quot;&lt;/td&gt; &lt;td&gt;&quot;.$amount.&quot;&lt;/td&gt; &lt;td&gt;&quot;.$amountdone.&quot;&lt;/td&gt; &lt;/TR&gt;&quot;; $x++; } echo &quot;&lt;/table&gt;&lt;/td&gt;&quot;; e $x=0; echo &quot;&lt;td&gt; &lt;TABLE WIDTH=200 CELLSPACING=0 CELLPADDING=5&gt; &lt;TR&gt; &lt;td&gt;Agency&lt;/td&gt; &lt;td&gt;Amount Registerd&lt;/td&gt; &lt;td&gt;Amount Completed&lt;/td&gt; &lt;/TR&gt;&quot;; while($x&lt;count($agency)){ $q = mysql_query(&quot;SELECT id FROM users WHERE agency='$agency[$x]'&quot;); $amount = mysql_num_rows($q); $r = mysql_query(&quot;SELECT id FROM users WHERE agency='$agency[$x]' AND locked='1'&quot;); $amountdone = mysql_num_rows($r); echo &quot; &lt;TR&gt; &lt;td&gt;&quot;.$agency[$x].&quot;&lt;/td&gt; &lt;td&gt;&quot;.$amount.&quot;&lt;/td&gt; &lt;td&gt;&quot;.$amountdone.&quot;&lt;/td&gt; &lt;/TR&gt;&quot;; $x++; } echo &quot;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;;...
View Full Document

This note was uploaded on 07/28/2009 for the course PHP 1 taught by Professor F during the Spring '09 term at Anne Arundel CC.

Page1 / 2

stats2 - $q = mysql_query(&amp;amp;quot;SELECT id FROM...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online