本文整理汇总了PHP中singleResult函数的典型用法代码示例。如果您正苦于以下问题:PHP singleResult函数的具体用法?PHP singleResult怎么用?PHP singleResult使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了singleResult函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MAX
?>
<div id="main">
<?php
// Initialize the latest data counter
$maxdate = 0;
// Get the requested period, if blank choose the latest
$period = $_GET['period'];
if ($period < 1) {
$SQL = "SELECT MAX(period) FROM netreport";
$period = singleResult($SQL, $db);
}
echo " <center>\n";
// Display the month name for this report
$SQL = 'SELECT lastday FROM periods WHERE periodno=' . $period;
echo " <p><h1>Public Service Honor Roll<br>for " . convertDate(singleResult($SQL, $db)) . "</h1></p>\n";
// Get the actual report data for this period
$SQL = 'SELECT `call`,`cat1`,`cat2`,`cat3`,`cat4`,`cat5`,`cat6`,`total`,`comment`,`updated` FROM `pshr` WHERE `period`=' . $period . ' ORDER BY `total` DESC';
$result = getResult($SQL, $db);
echo " <table>\n";
echo " <th>Call<th>Nets<th>Tfc<th>Appt<th>Plan<th>Emrg<th>Digi<th>Total<th>Comments<tr>\n";
// We will remember rownum to alternate colors in the table
$rownum = 1;
// Now loop through the rows of the data
while ($myrow = getRow($result, $db)) {
// Keep track of the latest data
if ($myrow[9] > $maxdate) {
$maxdate = $myrow[9];
}
// Switch between light and dark rows
if ($rownum != 0) {
示例2: getResult
echo " <table>\n";
$SQ1 = "SELECT `NETID`,count(*) AS Reports FROM `netreport` " . "WHERE `PERIOD` BETWEEN " . $startp . " AND " . $endp . " GROUP BY `NETID` " . "ORDER BY Reports DESC, `NETID`";
$rs1 = getResult($SQ1, $db);
while ($myr1 = getRow($rs1, $db)) {
echo " <tr>\n";
$SQ2 = "SELECT `NETACRO`,`NETFULLNAME` FROM `nets` WHERE `NETID`=" . $myr1[0];
$rs2 = getResult($SQ2, $db);
$myr2 = getRow($rs2, $db);
$netname = substr($myr2[1], 0, 25);
echo " <th>" . $myr2[0] . "</th>\n";
echo " <td>" . $netname . "</td>\n";
echo " <th>" . $myr1[1] . "</th>\n";
for ($p = 0; $p < 12; $p++) {
$thisp = $startp + $p;
$SQ3 = "SELECT COUNT(*) FROM `netreport` " . "WHERE `netid`=" . $myr1[0] . " AND `period`=" . $thisp;
$rs3 = singleResult($SQ3, $db);
if ($rs3 == 1) {
echo " <td>X</td>\n";
} else {
echo " <td style=\"background-color: red;\">-</td>\n";
}
}
echo " </tr>\n";
}
echo " </table>\n";
echo "<p></p>\n";
dateLinks($period, "netsummary", $db);
echo "</center>\n";
?>
</div>
<?php
示例3: convertDate
echo "<p><h1>Individual History</h1></p>\n";
echo "<table>\n";
echo "<tr><th align=\"left\">Period</th><th>SAR</th><td>Num</td><th>PSHR" . "</th><td>Num</td></tr>\n";
for ($period = $lastperiod; $period > 71; $period--) {
// Display the month name for this report
$SQL = 'SELECT `lastday` FROM `periods` WHERE `periodno`=' . $period;
$periodname = convertDate(singleResult($SQL, $db));
// Get the actual report data for this period
$S01 = "SELECT SUM(`total`) FROM `sar` WHERE `period`=" . $period;
$r1 = singleResult($S01, $db);
$S02 = "SELECT SUM(`TOTAL`) FROM `pshr` WHERE `period`=" . $period;
$r2 = singleResult($S02, $db);
$S03 = "SELECT COUNT(*) FROM `sar` WHERE `period`=" . $period;
$r3 = singleResult($S03, $db);
$S04 = "SELECT COUNT(*) FROM `pshr` WHERE `period`=" . $period;
$r4 = singleResult($S04, $db);
// We will use rownum to keep track of light and dark rows
$rownum = 1;
// The following variables are used to calculate totals for the month
// Display totals
if ($rownum != 0) {
$id = 'id="OsRow3"';
echo " <tr id=OsRow>\n";
$rownum = 0;
} else {
$id = 'id="OsRow4"';
echo " <tr id=OsRow2>\n";
$rownum = 1;
}
echo "<th align=\"left\">{$periodname}<td {$id} align=\"right\">" . $r1 . "</td><td {$id} align=\"right\">" . $r3 . "</td><td {$id} align=\"right\">" . $r2 . "</td><td {$id} align=\"right\">" . $r4 . "</td></tr>\n";
}
示例4: getResult
echo " </center>\n";
// Find out all calls that MIGHT be eligible
$SQL1 = "SELECT DISTINCT `call` FROM `pshr` WHERE `total`>69 AND `period` " . "BETWEEN " . $startperiod . " AND " . $period . " ORDER BY `call`";
$result1 = getResult($SQL1, $db);
// Now loop through the candidates
while ($row1 = getRow($result1, $db)) {
//echo "<p>" . $row1[0];
// Count up number of 70 or higher reports in past 12 months
$SQL2 = "SELECT COUNT(*) FROM `pshr` WHERE `total`>69 AND `period` " . "BETWEEN " . $shortperiod . " AND " . $period . " AND `call`='" . $row1[0] . "'";
// If >11, then this station is eligible
if (singleResult($SQL2, $db) > 11) {
echo "<p>" . callsign($row1[0]) . " eligible - >=70 " . $shortstring;
} else {
// Count up number of 70 or higher in past 24 months
$SQL3 = "SELECT COUNT(*) FROM `pshr` WHERE `total`>69 AND `period` " . "BETWEEN " . $startperiod . " AND " . $period . " AND `call`='" . $row1[0] . "'";
$count = singleResult($SQL3, $db);
// If >17 then this station is eligible
if ($count > 17) {
echo "<p>" . callsign($row1[0]) . " eligible - >=70 " . $count . " months in past 24";
echo "<br />\n";
// Get the list of qualifying months
$SQL4 = "SELECT `lastday` FROM `pshr` A, `periods` B " . "WHERE `total`>69 AND `period` BETWEEN " . $startperiod . " AND " . $period . " AND `call`='" . $row1[0] . "' AND A.`period`=B.`periodno` ORDER BY A.`period`";
$result4 = getResult($SQL4, $db);
$dashed = 0;
while ($row4 = getRow($result4, $db)) {
if ($dashed) {
echo " - ";
}
$dashed = 1;
echo convertDateShort($row4[0]);
}
示例5: getResult
$qec = "SELECT `name` FROM `calldirectory` WHERE `callsign`='" . $row2[2] . "'";
$rec = getResult($qec, $db);
$ecname = '';
// In case EC missing from calldirectory, display call only,
// don't display ',' before call or (blank) name
if ($rowec = getRow($rec, $db)) {
$ecname = $rowec[0];
$eccall = $ecname . ", " . $eccall;
}
echo " <entry><indexterm><primary>" . $row2[0] . "</primary></indexterm>" . $row2[0] . "</entry>\n";
echo " <entry>" . $eccall . "</entry>\n";
// Pick up membership information
$q3a = "SELECT MAX(`period`) FROM `arpsc_ecrept` " . "WHERE `county`='" . $row2[1] . "'";
if ($maxp = singleResult($q3a, $db)) {
$q3 = "SELECT `aresmem` FROM `arpsc_ecrept` " . "WHERE `county`='" . $row2[1] . "' AND " . "`period`=" . $maxp;
$r3 = singleResult($q3, $db);
echo " <entry align=\"center\">" . $r3 . "</entry>\n";
} else {
echo " <entry><para> </para></entry>\n";
}
// Pick up contact information
/* $q3="SELECT ares_contact_type, contact, validity " . */
/* "FROM ares_contact_info A, ares_contact_type B " . */
/* "WHERE A.type = B.type AND A.call='" . $row2[2] . "'"; */
/* $r3 = getResult($q3,$db); */
/* echo " <entry>\n"; */
/* echo " <itemizedlist spacing='compact'>\n"; */
/* $membercount = 0; */
/* while ( $row3 = getRow($r3,$db) ) */
/* { */
/* if ( $row3[2] == 1 ) */
示例6: MAX
$maxdate = 0;
// Get the requested period, if blank choose the latest
$period = $_GET['period'];
if ($period < 1) {
$SQL = "SELECT MAX(`period`) FROM `netreport`";
$period = singleResult($SQL, $db);
}
echo " <center>\n";
$lastperiod = $period;
echo "<p><h1>Net History</h1></p>\n";
echo "<table width=\"90%\">\n";
echo "<tr><th align=\"left\">Period</th><th>QNI</th><th>QTC" . "</th><th>QTR</th><th>Sess</th><th>Hours</th></tr>\n";
for ($period = $lastperiod; $period > 71; $period--) {
// Display the month name for this report
$SQL = 'SELECT `lastday` FROM `periods` WHERE `periodno`=' . $period;
$periodname = convertDate(singleResult($SQL, $db));
// Get the actual report data for this period
$SQL = 'SELECT B.`netfullname`,A.`QNI`,A.`QTC`,A.`QTR`,A.`sessions`,' . 'A.`updated`,A.`manhours`,A.`netid` ' . 'FROM `netreport` A, `nets` B ' . 'WHERE A.`period`=' . $period . ' AND A.`netID`=B.`netID` ' . 'ORDER BY `QTC` DESC, `QNI` DESC';
$result = getResult($SQL, $db);
// We will use rownum to keep track of light and dark rows
$rownum = 1;
// The following variables are used to calculate totals for the month
$TQNI = 0;
$TQTC = 0;
$TQTR = 0;
$TSess = 0;
$TMH = 0;
// Loop through the rows of the result
while ($myrow = getRow($result, $db)) {
// Update the latest data date, if necessary
if ($myrow[5] > $maxdate) {
示例7: strftime
$starttime = strftime("%A, %B %d %Y, %H:%M");
// Open the database
$db = mysql_connect($host, $dbuser, $dbpassword);
mysql_select_db($DatabaseName, $db);
ARESheader($title, "Adjust Member Count");
ARESleftBar($db);
echo ' <div id="main">' . "\n";
$Q1 = "SELECT DISTINCT `COUNTY` FROM `arpsc_ecrept`";
$R1 = getResult($Q1, $db);
while ($row1 = getRow($R1, $db)) {
$Q2 = "SELECT MAX(`PERIOD`) FROM `arpsc_ecrept` " . "WHERE `county`='" . $row1[0] . "'";
$last = singleResult($Q2, $db);
$Q3 = "SELECT `ARESMEM` FROM `arpsc_ecrept` " . "WHERE `COUNTY`='" . $row1[0] . "' " . "AND `PERIOD`=" . $last;
$latest = singleResult($Q3, $db);
$Q4 = "SELECT `ARESMEM` FROM `arpsc_ecrept` " . "WHERE `COUNTY`='" . $row1[0] . "' " . "AND `PERIOD`=0";
$zeroth = singleResult($Q4, $db);
echo "<p>" . $row1[0] . ": " . $last . ", ";
if ($latest == $zeroth) {
echo $latest . ", " . $zeroth . "</p>\n";
} else {
if ($zeroth > 0) {
echo "<b>" . $latest . ", " . $zeroth . "</b><br/>\n";
$Q5 = 'UPDATE `arpsc_ecrept` SET `ARESMEM`=' . $latest . " WHERE `COUNTY`='" . $row1[0] . "' AND `PERIOD`=0";
echo "---" . $Q5 . "---</p>\n";
$R5 = getResult($Q5, $db);
} else {
echo "<span style=\"color: red;\">" . $latest . ", " . $zeroth . "</span><br />\n";
$Q5 = "INSERT INTO `arpsc_ecrept` (PERIOD,COUNTY,ARESMEM,UPDATED) " . "VALUES(0,'" . $row1[0] . "'," . $latest . ",NOW());";
echo "---" . $Q5 . "---</p>\n";
$R5 = getResult($Q5, $db);
}
示例8: addUpdate
$SQL7 = addUpdate('aresopsnum', $DNUMTOT, $SQL7);
$SQL7 = addUpdate('aresops', $DPHTOT, $SQL7);
$SQL7 = addUpdate('comments', $DCOMMENTS, $SQL7);
$SQL7 = addUpdate('reportcall', $DREPORTCALL, $SQL7);
$SQL7 = addUpdate('reportname', $DREPORTNAME, $SQL7);
$SQL7 = substr($SQL7, 0, strlen($SQL7) - 2);
$SQL7 = $SQL7 . ' WHERE period=' . $DPERIOD . ' AND county = ' . $DCOUNTY;
// echo '<P><FONT FACE="Courier New" SIZE=3>' . $SQL7 . "</FONT></P>\n";
if (getResult($SQL7, $db)) {
echo " <P>Your report has been updated in the database.</P>\n";
}
}
$SQL2 = "SELECT lastday FROM periods WHERE periodno=" . $PERIOD;
$LASTDAY = singleResult($SQL2, $db);
$SQL3 = "SELECT countyname FROM arpsc_counties WHERE countycode='" . $COUNTY . "'";
$COUNTYNAME = singleResult($SQL3, $db);
echo " </TD>\n</TABLE>\n";
echo "<HR>\n";
echo "<TABLE CLASS=main_area>\n <TD>\n";
echo "<P CLASS=report_area><B>FSD-212 report from " . $REPORTNAME . ", " . $REPORTCALL . " <" . $REPORTEMAIL . ">" . ".</B></P>\n";
echo "<P CLASS=report_area>(1) County: <B>" . $COUNTYNAME . " (" . $COUNTY . ")</B></P>\n";
echo "<P CLASS=report_area>(2) Period: <B>" . convertDate($LASTDAY) . "</B></P>\n";
echo "<P CLASS=report_area>(4) Number of ARES members: <B>" . $ARESMEM . "</B></P>\n";
echo "<P CLASS=report_area>(5) Change since last month: <B>" . $ARESCHG . "</B></P>\n";
echo "<P CLASS=report_area>(6) Local net name: <B>" . $NETNAME . "</B></P>\n";
echo "<P CLASS=report_area>(7) Local net frequency: <B>" . $NETFREQ . "</B></P>\n";
echo "<P CLASS=report_area>(8) Liaisons maintained with the following NTS net(s): <B>" . $NETLIA . "</B></P>\n";
echo "<P CLASS=report_area>(9) Number of nets, drills, tests and training sessions: <B>" . $NUMNET . "</B> Hours: <B>" . $PHNET . "</B></P>\n";
echo "<P CLASS=report_area>(10) Number of public service events: <B>" . $NUMPSE . "</B> Hours: <B>" . $PHPSE . "</B></P>\n";
echo "<P CLASS=report_area>(11) Number of emergency operations: <B>" . $NUMEOP . "</B> Hours: <B>" . $PHEOP . "</B></P>\n";
echo "<P CLASS=report_area>(12) Total number of ARES events: <B>" . $NUMTOT . "</B> Hours: <B>" . $PHTOT . "</B></P>\n";
示例9: singleResult
}
}
echo " </tr>\n";
for ($daynum = 0; $daynum < 7; $daynum++) {
$SQL3 = "SELECT `day_of_week` FROM `rep_dow` WHERE `id`=" . $daynum;
$daytext = singleResult($SQL3, $db);
echo " <tr>\n";
echo " <th>" . $daytext . "</th>\n";
$res1 = getResult($SQL1, $db);
while ($row1 = getRow($res1, $db)) {
$SQL4 = "SELECT `call` FROM `rep_liaisons` WHERE `day_of_week`=" . $daynum . " AND `net`=" . $row1[0];
$call = singleResult($SQL4, $db);
if ($call) {
echo " <td align=\"center\">" . $call . "</td>\n";
$SQL6 = "SELECT `updated` FROM `rep_liaisons` WHERE `day_of_week`=" . $daynum . " AND `net`=" . $row1[0];
$updated = singleResult($SQL6, $db);
if ($updated > $maxdate) {
$maxdate = $updated;
}
} else {
echo " <td> </td>\n";
}
}
echo " </tr>\n";
}
echo "</table>\n";
echo "<p> </p>\n";
/* // Get the actual report data for this period
$SQL='SELECT `call`,`total`,`notes`,`updated` FROM `sar` WHERE `period`='
. $period . ' ORDER BY `total` DESC';
$result=getResult($SQL,$db);
示例10: getResult
$SQL = 'SELECT `netid`,`qtc`,`updated` FROM `netreport` WHERE `period`=' . $period . ' ORDER BY `qtc` DESC';
$result = getResult($SQL, $db);
echo " <P>Net traffic for " . convertDate($usedate) . ": ";
$counter = 0;
while ($myrow = getRow($result, $db)) {
if ($counter > 0) {
echo ", ";
}
if ($myrow[2] > $maxdate) {
$maxdate = $myrow[2];
}
$SQL2 = "SELECT `netfullname` FROM `nets` WHERE `netid`=" . $myrow[0];
$netname = singleResult($SQL2, $db);
// Now display the data
echo $netname . " " . $myrow[1];
$counter = $counter + 1;
}
echo ". </P>\n";
$SQL = "SELECT SUM(`QTC`) FROM `netreport`" . " WHERE `period`=" . $period;
echo "<p>Total net traffic reported: " . singleResult($SQL, $db) . "</p>\n";
echo " </td></tr>\n";
echo " <tr><td> </td></tr>\n";
echo "</table>\n";
echo "<P> </p>\n";
echo "<div id=\"footer\">\n";
footer($starttime, $maxdate, "\$Revision: 1.0 \$ - \$Date: 2013-03-15 13:27:48-04 \$");
echo "</div>\n";
?>
</BODY>
</HTML>
示例11: singleResult
echo " <td align=\"center\" " . "style=\"background:white;\">" . $row1[1] . "</td>\n";
if ($maxdate < $row1[2]) {
$maxdate = $row1[2];
}
} else {
echo " <td> </td>\n";
}
echo " </tr>\n";
}
} else {
// QMN
echo " <th>Early NCS</th>\n <th>Late NCS</th>\n";
echo " </tr>\n";
for ($day = 0; $day < 7; $day++) {
$SQL3 = "SELECT `day_of_week` FROM `rep_dow` WHERE `id`=" . $day;
$daytext = singleResult($SQL3, $db);
echo " <tr>\n";
echo " <th>" . $daytext . "</th>\n";
// QMN Early
$SQL4 = "SELECT `call`,`updated` FROM `net_controls` " . "WHERE `netid`=" . $netid . " AND `dow`=" . $day;
$res4 = getResult($SQL4, $db);
if ($row4 = getRow($res4, $db)) {
echo " <td align=\"center\" " . "style=\"background:white;\">" . $row4[0] . "</td>\n";
if ($maxdate < $row4[1]) {
$maxdate = $row4[1];
}
} else {
echo " <td> </td>\n";
}
// QMN Late
$SQL5 = "SELECT `call`,`updated` FROM `net_controls` " . "WHERE `netid`=" . $otherid . " AND `dow`=" . $day;
示例12: singleResult
// Update the latest data date, if necessary
if ($myrow[6] > $maxdate) {
$maxdate = $myrow[6];
}
// Choose between light and dark rows
if ($rownum != 0) {
$id = 'id="OsRow3"';
echo " <tr id=OsRow>\n";
$rownum = 0;
} else {
$id = 'id="OsRow4"';
echo " <tr id=OsRow2>\n";
$rownum = 1;
}
$SQL3 = "SELECT `lastday` FROM `periods` WHERE `periodno`=" . $myrow[0];
$longdate = singleResult($SQL3, $db);
echo ' <td ' . $id . ' align="left">' . convertDateShort($longdate) . "</td>\n";
echo ' <td ' . $id . ' align="right">' . $myrow[1] . "</td>\n";
echo ' <td ' . $id . ' align="right">' . $myrow[2] . "</td>\n";
echo ' <td ' . $id . ' align="right">' . $myrow[3] . "</td>\n";
echo ' <td ' . $id . ' align="right">' . $myrow[4] . "</td>\n";
// Calculate totals for the obvious ones
$TQNI = $TQNI + $myrow[1];
$TQTC = $TQTC + $myrow[2];
$TQTR = $TQTR + $myrow[3];
$TSess = $TSess + $myrow[4];
// For manhours, use reported if available
if ($myrow[5] > 0) {
echo ' <td ' . $id . ' align="right">' . $myrow[5] . "</td>\n";
$TMH = $TMH + $myrow[5];
} else {
示例13: getResult
//==================================================================================================
$q1 = 'SELECT `districtkey`, `district_code` from `arpsc_districts` ORDER BY `district_code`';
$r1 = getResult($q1, $db);
$olddistrict = 0;
while ($row1 = getRow($r1, $db)) {
$district = $row1[1];
$q2 = "SELECT `countyname`, `countycode` FROM `arpsc_counties` WHERE `district`='" . $district . "' ORDER BY `countyname`";
$r2 = getResult($q2, $db);
if ($district < ":") {
echo "<tr></tr>\n";
$sqlc = 'SELECT COUNT(*) FROM `arpsc_counties` WHERE `district`=' . $district;
$lc = singleResult($sqlc, $db);
// Extra line for staff, if reported ----------------------------
$key1 = "D" . $district;
$sqlc1 = "SELECT COUNT(*) FROM `arpsc_ecrept` WHERE `county`='" . $key1 . "' AND `period`=" . $period;
if (singleResult($sqlc1, $db) > 0) {
$lc = $lc + 1;
}
while ($row2 = getRow($r2, $db)) {
//echo $district . ',' . $row2[0] . "<br>\n";
$q3 = 'SELECT `aresmem`,`drillsnum`,`drillshrs`,`psesnum`,`pseshrs`,`eopsnum`,`eopshrs`,`aresopsnum`,`aresops` ' . "FROM `arpsc_ecrept` WHERE `county`='" . $row2[1] . "' AND `period`=" . $period;
$r3 = getResult($q3, $db);
if ($row3 = getRow($r3, $db)) {
$hours = $row3[2] + $row3[4] + $row3[6] + $row3[8];
$value = $hours * $hourvalue;
$lastperiod = $period - 1;
$q4 = "SELECT `aresmem` FROM `arpsc_ecrept` WHERE `county`='" . $row2[1] . "' AND `period`=" . $lastperiod;
$r4 = getResult($q4, $db);
if ($row4 = getRow($r4, $db)) {
$change = $row3[0] - $row4[0];
} else {
示例14: MAX
?>
<div id="main">
<?php
// Initialize the latest data counter
$maxdate = 0;
// Get the requested period, if blank choose the latest
$period = $_GET['period'];
if ($period < 1) {
$SQL = "SELECT MAX(period) FROM netreport";
$period = singleResult($SQL, $db);
}
echo " <center>\n";
// Display the month name for this report
$SQL = 'SELECT lastday FROM periods WHERE periodno=' . $period;
echo "<p><h1>Net reports for " . convertDate(singleResult($SQL, $db)) . "</h1></p>\n";
// Get the actual report data for this period
$SQL = 'SELECT B.netfullname,A.QNI,A.QTC,A.QTR,A.sessions,A.updated,A.manhours ' . 'FROM netreport A, nets B ' . 'WHERE A.period=' . $period . ' AND A.netID=B.netID ' . 'ORDER BY QTC DESC, QNI DESC';
$result = getResult($SQL, $db);
echo "<table>\n";
echo "<tr><th align=\"left\">Net Name</th><th>QNI</th><th>QTC</th><th>QTR</th><th>Sessions</th><th>Hours</th></tr>\n";
// We will use rownum to keep track of light and dark rows
$rownum = 1;
// The following variables are used to calculate totals for the month
$TQNI = 0;
$TQTC = 0;
$TQTR = 0;
$TSess = 0;
$TMH = 0;
// Loop through the rows of the result
while ($myrow = getRow($result, $db)) {
示例15: mysql_connect
echo " <center><b>" . $county . " (" . $ccode . ")</b><br />\n";
// Now open the database and write the result
//include('../includes/miscFunctions.inc');
$db = mysql_connect("localhost", $dbuser, $dbpwd);
if (!$db) {
echo "<p>User:" . $dbuser . " Pwd:" . $dbpwd . "</p>\n";
die($err . " Connect db error #" . mysql_errno($db) . "</p>\n");
echo "<p onload=document.getElementByID(\"errordiv\").innerHTML = \"ERROR\"> </p>\n";
$GLOBALS['uploaderror'] = 1;
}
if (!mysql_select_db($DatabaseName, $db)) {
die($err . " Select db error #" . mysql_errno($db) . "</p>\n");
$GLOBALS['uploaderror'] = 1;
}
$q = "SELECT COUNT(*) FROM `ares_juris` WHERE `call` = '" . $_SESSION['call'] . "' AND `juris` = '" . $ccode . "'";
if (!($res = singleResult($q, $db))) {
$GLOBALS['uploaderror'] = 1;
die($err . " no authorization " . $county . "</p>\n");
}
// Generate initial SQL
$havedata = 0;
$sql = "INSERT INTO `arpsc_ecrept` VALUES(" . thePeriod() . ",'" . $ccode . "',";
// Open the table for results display
echo " </span>\n <span style=\"color:mediumblue;\">\n";
$s = fgets($fh, 256);
$s = fgets($fh, 256);
echo " <span style=\"font-size:8px;\">\n";
echo " <table border=\"0\" width=50%>\n";
// Members
$sql = nextRow($fh, $sql, $m);
$sql = $sql . "NULL,NULL,NULL,NULL, ";