Difference between revisions of "PHP:Clientupdates body"

From distributed.net
Jump to: navigation, search
(Created page with '// <pre> $db = mysql_pconnect("localhost", "clientsro", "R3ad0nLy"); mysql_select_db("clients",$db); $result = mysql_query("select S.ranking, S.description as s_description, C…')
 
Line 21: Line 21:
 
     printf("<tr><td>&nbsp;</td>" .
 
     printf("<tr><td>&nbsp;</td>" .
 
           "<td>%s&nbsp;%s </td>" .
 
           "<td>%s&nbsp;%s </td>" .
           '<td nowrap="nowrap" align="right"><b>%s</b></td>" .
+
           '<td nowrap="nowrap" align="right"><b>%s</b></td>' .
 
           "</tr>"
 
           "</tr>"
 
       , $clientrow['s_description'], $clientrow['c_description'], $clientrow['build'] );
 
       , $clientrow['s_description'], $clientrow['c_description'], $clientrow['build'] );

Revision as of 22:28, 12 May 2010

//

$db = mysql_pconnect("localhost", "clientsro", "R3ad0nLy");
mysql_select_db("clients",$db);


$result = mysql_query("select S.ranking, S.description as s_description, C.releasedate, C.build, C.description as c_description, C.urlpart, C.instruct, S.sectionid from sections S, clients C where C.sectionid=S.sectionid and C.visible='true' order by C.releasedate Desc, S.ranking Desc, S.description, C.build",$db);


$lastsection = "";

print "<table>";

while ($clientrow = mysql_fetch_array($result))
{
    if ($clientrow['releasedate'] != $lastsection) {
         printf('<tr><td colspan="4"><b>%s</b></td></tr>', $clientrow['releasedate']);
         $lastsection = $clientrow['releasedate'];
     }

     printf("<tr><td> </td>" .
          "<td>%s %s </td>" .
          '<td nowrap="nowrap" align="right"><b>%s</b></td>' .
          "</tr>"
      , $clientrow['s_description'], $clientrow['c_description'], $clientrow['build'] );
}

print "</table>";

//