当前位置: 首页>>代码示例>>PHP>>正文


PHP mysqlfetcharray函数代码示例

本文整理汇总了PHP中mysqlfetcharray函数的典型用法代码示例。如果您正苦于以下问题:PHP mysqlfetcharray函数的具体用法?PHP mysqlfetcharray怎么用?PHP mysqlfetcharray使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了mysqlfetcharray函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getSubordinateOperationsStaff

/**
* OPERATIONS STAFF FUNCTIONS
*/

function getSubordinateOperationsStaff($supervisor) {
	$query=0;
	$query=mysqlquery("select id from vl_users where reportsTo='$supervisor'");
	if(mysqlnumrows($query)) {
		$staff=array();
		while($q=mysqlfetcharray($query)) {
			$staff[]=$q["id"];
		}
		return $staff;
	}
}
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:15,代码来源:functions.staff.php

示例2:

echo $suspectedTreatmentFailureValue;
?>
" class="search_pre" size="7" maxlength="10" /></td>
                              <td align="right">Sample&nbsp;Type:</td>
                              <td style="padding:0px 0px 0px 5px">
								<select name="suspectedTreatmentFailureSampleTypeID" id="suspectedTreatmentFailureSampleTypeID" class="search">
                                <?
								$query=0;
								$query=mysqlquery("select * from vl_appendix_sampletype order by position");
								if($suspectedTreatmentFailureSampleTypeID) {
									echo "<option value=\"$suspectedTreatmentFailureSampleTypeID\" selected=\"selected\">".getDetailedTableInfo2("vl_appendix_sampletype","id='$suspectedTreatmentFailureSampleTypeID' limit 1","appendix")."</option>";
								} else {
									echo "<option value=\"\" selected=\"selected\">Select Sample Type</option>";
								}
								if(mysqlnumrows($query)) {
									while($q=mysqlfetcharray($query)) {
										echo "<option value=\"$q[id]\">$q[appendix]</option>";
									}
								}
								?>
                                </select>
                              </td>
                            </tr>
						</table>
                        </div>
                </fieldset>
              </td>
            </tr>
            <? //if(!getDetailedTableInfo2("vl_samples_verify","sampleID='$modify'","outcome")) { ?>
            <tr>
              <td style="padding:10px 0px 0px 0px">
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:31,代码来源:tpl.samples.modify.deprecated.php

示例3: mysqlfetcharray

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<title>Viral Load</title>
		<link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
		<link href="/css/vl2.css" rel="stylesheet" type="text/css">

		<script src="/js/jquery-2.1.3.min.js"></script>
		<script src="/bootstrap/js/bootstrap.min.js"></script>
		<script src="/js/jquery.qrcode.min.js" type="text/javascript"></script>
	</head>
	<body>
		<div id="print-btn-div" style='text-align:center; padding:20px;'><button id="print-btn" class='btn btn-primary' >PRINT</button></div>
	
		<?php 
$row = mysqlfetcharray($results);
extract($row, EXTR_PREFIX_ALL, "row");
$machine_type = $row_machineType;
$factor = $row_factor;
$signature_path = $row_signaturePATH;
include "_sample_print.php";
if ($row_verify_outcome == "Rejected") {
    mysqlquery("insert into vl_logs_printedrejectedresults \n\t\t\t\t\t    (sampleID, created, createdby ) \n\t\t\t\t\t    values ('{$row_id}', '{$datetime}', '{$trailSessionUser}') ");
} elseif (!empty($row_worksheetID)) {
    mysqlquery("insert into vl_logs_printedresults \n\t\t\t\t\t\t(sampleID,worksheetID,created,createdby) \n\t\t\t\t\t\tvalues ('{$row_id}','{$row_worksheetID}','{$datetime}','{$trailSessionUser}');");
}
?>

		<script type="text/javascript">
		jQuery(function(){
			jQuery('.qrcode-output').each(function (index){
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:31,代码来源:tpl.sample.results.print.php

示例4: WHERE

<?php

$GLOBALS['vlDC'] = true;
include "conf.php";
$sql = " SELECT s.id AS s_id, lrCategory, lrEnvelopeNumber, lrNumericID, vlSampleID, formNumber  \n\t   FROM vl_samples AS s\n\t   WHERE (formNumber LIKE '%{$q}%') \n\t   LIMIT 10";
$res = mysqlquery($sql);
$str = "<table width=100%>";
$str .= "<tr><th>VL Testing #</th><th> Form Number</th><th>Location ID</th></tr>";
while ($row = mysqlfetcharray($res)) {
    extract($row);
    $link = "href=\"javascript:windPop('/sample_results/print/{$s_id}/')\"";
    $l_smpl_id = "<a {$link}>{$vlSampleID}</a>";
    $l_form = "<a {$link}>{$formNumber}</a>";
    $l_locator = "<a {$link}>{$lrCategory}{$lrEnvelopeNumber}{$lrNumericID}</a>";
    $str .= "<tr><td>{$l_smpl_id}</td><td>{$l_form}</td><td>{$l_locator}</td></tr>";
}
$str .= "</table>";
echo $str;
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:18,代码来源:index.sample_results.live_search.php

示例5: fixDuplicateSampleIDs

/**
* function to fix repeated samples in the VL database
*/
function fixDuplicateSampleIDs() {
	global $datetime,$trailSessionUser;
	//get any duplicate sample IDs
	$query=0;
	$query=mysqlquery("select vlSampleID,count(id) num from vl_samples group by vlSampleID having num>1 order by num desc");
	if(mysqlnumrows($query)) {
		while($q=mysqlfetcharray($query)) {
			//query where vlSampleID=$q[vlSampleID]
			$queryS=0;
			$queryS=mysqlquery("select * from vl_samples where vlSampleID='$q[vlSampleID]' order by created");
			$count=0;
			while($qS=mysqlfetcharray($queryS)) {
				$count+=1;
				//only change the 2nd vlSampleID onwards
				if($count>1) {
					$vlSampleArray=0;
					$vlSampleArray=explode("/",trim($q["vlSampleID"]));
					
					$sampleLength1=0;
					$sampleLength1=strlen($vlSampleArray[0]);
					$sampleLength2=0;
					$sampleLength2=strlen(($vlSampleArray[0]/1)+($count-1));
					$sampleLengthFinal=0;
					$sampleLengthFinal=abs($sampleLength1-$sampleLength2);
					
					$vlSample1=0;
					$vlSample1=($vlSampleArray[0]/1)+($count-1);
					switch($sampleLengthFinal) {
						case "5":
							$vlSample1="00000".$vlSample1;
						break;
						case "4":
							$vlSample1="0000".$vlSample1;
						break;
						case "3":
							$vlSample1="000".$vlSample1;
						break;
						case "2":
							$vlSample1="00".$vlSample1;
						break;
						case "1":
							$vlSample1="0".$vlSample1;
						break;
					}
					
					$vlSampleID=0;
					$vlSampleID=$vlSample1."/".$vlSampleArray[1];
					//update vl_samples
					mysqlquery("update vl_samples set vlSampleID='$vlSampleID' where id='$qS[id]'");
				}
			}
		}
	}
}
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:57,代码来源:functions.samples.php

示例6: loadCountriesFromRegion

/**
* function to get specific countries from a region
* @param: $region e.g. africa, south america etc
*/
function loadCountriesFromRegion($region,$companyID) {
	if($region) {
		global $user;
	
		$theUserID=0;
		//ensure $user is not a visitor
		if(substr($user,0,7)!="visitor") {
			$theUserID=getUserID($user);
		}
	
		//get the towns first
		$query=0;
		$query=mysqlquery("select distinct countryID,country from vl_countries where region='$region' order by country");
		if(mysqlnumrows($query)) {
			$return=0;
			$return="
				<table width=\"100%\" border=\"0\">
				  <tr>
					<td colspan=\"2\">Select the markets covered:</td>
				  </tr>";
			$q=array();
			while($q=mysqlfetcharray($query)) {
				$return.="
						<tr>
							<td width=\"1%\"><input type=\"checkbox\" name=\"marketscoveredUnique[]\" value=\"$q[countryID]\" ".(checkMarketAgainstProvider($theUserID,$q["countryID"],$companyID)?"checked":"")."></td>
							<td width=\"99%\">$q[country]</td>
						</tr>";
			}
			$return.="</table>";
	
			return $return;
		} else {
			$return=0;
			$return="No countries found in database!";
	
			return $return;
		}
	}
}
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:43,代码来源:functions.countries.php

示例7: getRemovedData

/**
* get data for removal
* @param: $query
*/
function getRemovedData($query) {
	//removed data
	$removedData="";
	
	//get the table name, usually the 3rd word in the query
	$wordInQuery=array();
	$wordInQuery=explode(" ",$query);
	$tableName=0;
	$tableName=$wordInQuery[2];
	
	//get fields in table
	$tableQuery=0;
	$tableQuery=mysqlquery("desc $tableName");
	if(mysqlnumrows($tableQuery)) {
		$fieldsInTable=array();
		while($row=mysqlfetcharray($tableQuery)) {
			$fieldsInTable[]=$row["Field"];
		}
	}
	
	//switch statement from "delete from" to "select * from"
	$newQuery=0;
	$newQuery=preg_replace("/delete from/is","select * from",$query);
	
	//ran the select query
	$selectQuery=0;
	$selectQuery=mysqlquery($newQuery);
	if(mysqlnumrows($selectQuery) && count($fieldsInTable)) {
		for($i=0;$i<count($fieldsInTable);$i++) {
			$removedData.="$fieldsInTable[$i]::".mysqlresult($selectQuery,0,"$fieldsInTable[$i]").($i<(count($fieldsInTable)-1)?"|":"");
		}
	}
	
	//return
	return $removedData;
}
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:40,代码来源:functions.debug.php

示例8: sendPlainEmail2Admins

function sendPlainEmail2Admins($from,$fromName,$subject,$title,$message) {
	global $home_url;
	global $mail;
	global $user;

	//query admins
	$query=0;
	$query=mysqlquery("select email from vl_admins");
	$q=array();
	while($q=mysqlfetcharray($query)) {
		queMail($fromName,$from,$q["email"],$subject,$message,0);
	}
}
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:13,代码来源:functions.email.php

示例9: lower

//should we send the password to an email?
if($remindEmail) {
	resetPassword($remindEmail);
	go("/sentreminder/$remindEmail/");
}

if($login && $email && $pass) {
	//validate
	$email=validate($email);
	
	//authenticate
	$u=0;
	$u=mysqlquery("select * from vl_users where lower(email)='".strtolower($email)."'");
	if(mysqlnumrows($u)) {
		while($un=mysqlfetcharray($u)) {
			if(strtolower($email)==strtolower($un["email"])) {
				//email authentic
				if(vlSimpleDecrypt($un["xp"])==hash("sha256",$pass)) {
					//has this account been de-activated?
					if(!$un["active"]) {
						go("/login/in/");
					} else {
						//register session variables
						$_SESSION["VLEMAIL"]=$email;
						//log
						mysqlquery("update vl_users set lastLogin='$datetime' where email='$_SESSION[VLEMAIL]'");
						//redirect
						go("/dashboard/welcome/");
					}
				} else {
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:30,代码来源:tpl.home.prelogin.php

示例10: getUserInfoByClientNumber

/**
* function to check the client number
* @param: $clientnumber
* @param: $formname
* @param: $id
* @param: $customertype
* @param: $version
*/
function getUserInfoByClientNumber($clientNumber,$column) {
	global $datetime,$trailSessionUser;
	
	//flag
	$datafound=0;
    
    //prepare all relevant variables
    $data=0;
    
	//start by searching clientNumber in vl_profile_customers
	$query=0;
	$query=mysqlquery("select $column from vl_profiles_customers where clientNumber='$clientNumber' order by created desc");
	if(mysqlnumrows($query)) {
		//flag
		$datafound=1;
        //get data
        $q=array();
        while($q=mysqlfetcharray($query)) {
            $data=($data?$data:$q["$column"]);
        }
	}
    
	//then search ClientNumber in vl_datacap111
	if($column!="ClientAdviceNoticeFlag") {
		$query=0;
		$query=mysqlquery("select $column from vl_datacap111 where ClientNumber='$clientNumber' order by created desc");
		if(mysqlnumrows($query)) {
			//flag
			$datafound=1;
			//get data
			$q=array();
			while($q=mysqlfetcharray($query)) {
				$data=($data?$data:$q["$column"]);
			}
		}
	}
    
	//then search ClientNumber in vl_datacba111
	$query=0;
	$query=mysqlquery("select $column from vl_datacba111 where ClientNumber='$clientNumber' order by created desc");
	if(mysqlnumrows($query)) {
		//flag
		$datafound=1;
        //get data
        $q=array();
        while($q=mysqlfetcharray($query)) {
            $data=($data?$data:$q["$column"]);
        }
	}
    
	//then search ClientNumber in vl_databc111
	if($column!="ClientAdviceNoticeFlag" && $column!="ClientConsentFlag") {
		$query=0;
		$query=mysqlquery("select $column from vl_databc111 where ClientNumber='$clientNumber' order by created desc");
		if(mysqlnumrows($query)) {
			//flag
			$datafound=1;
			//get data
			$q=array();
			while($q=mysqlfetcharray($query)) {
				$data=($data?$data:$q["$column"]);
			}
		}
	}
    
	if($column!="ClientAdviceNoticeFlag") {
		//then search ClientNumber in vl_datacap109
		$query=0;
		$query=mysqlquery("select $column from vl_datacap109 where ClientNumber='$clientNumber' order by created desc");
		if(mysqlnumrows($query)) {
			//flag
			$datafound=1;
			//get data
			$q=array();
			while($q=mysqlfetcharray($query)) {
				$data=($data?$data:$q["$column"]);
			}
		}
	}
    
	//then search ClientNumber in vl_datacba109
	$query=0;
	$query=mysqlquery("select $column from vl_datacba109 where ClientNumber='$clientNumber' order by created desc");
	if(mysqlnumrows($query)) {
		//flag
		$datafound=1;
        //get data
        $q=array();
        while($q=mysqlfetcharray($query)) {
            $data=($data?$data:$q["$column"]);
        }
	}
//.........这里部分代码省略.........
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:101,代码来源:functions.user.php

示例11: removeUserImages

/**
* remove user images
*/

function removeUserImages($email) {
	$query=0;
	$query=mysqlquery("select * from vl_filenames where createdby='$email'");
	if(mysqlnumrows($query)) {
		$q=array();
		while($q=mysqlfetcharray($query)) {
			if(file_exists($q["filepath"])) {
				unlink($q["filepath"]);
			}
		}
	}
	logDataRemoval("delete from vl_filenames where createdby='$email'");
	mysqlquery("delete from vl_filenames where createdby='$email'");
}
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:18,代码来源:functions.files.php

示例12: queryTableInfo

/**
* function to query a table using the standard $query=mysqlquery("select statement")
* @param: $q
* @param: $field - which field should we return
*/
function queryTableInfo($q,$field) {
	global $trailSessionUser,$p,$a;
	$query=0;
	$query=mysqlquery("$q");
	if(!mysqlerror()) {
		if(mysqlnumrows($query)) {
			$q=array();
			$return=array();
			while($q=mysqlfetcharray($query)) {
				$return[]=$q["$field"];
			}
			return $return;
		}
	} else {
		//log this error
		$errorName=0;
		$errorName="Database Error!";
		$errorDescription=0;
		$errorDescription="<strong>Database error:</strong> ".mysqlerror();
		$errorDescription.="<br><strong>URL:</strong> ".getThisURL();
		$errorDescription.="<br><strong>Page:</strong> $p";
		$errorDescription.="<br><strong>Action:</strong> $a";
		logError($errorName,$errorDescription,"",getUserID($trailSessionUser));
	}
}
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:30,代码来源:functions.tables.php

示例13: XloadFacilityFromFormName

/**
* update application number
*/
function XloadFacilityFromFormName($formnumber,$formName,$fieldID,$facilityIDField) {
	//validate
	$formnumber=validate($formnumber);
	$formName=validate($formName);
	$fieldID=validate($fieldID);
	$facilityIDField=validate($facilityIDField);
	$objResponse = new vlDCResponse();
	//reference number
	$refNumber=0;
	$refNumber=getDetailedTableInfo2("vl_forms_clinicalrequest","formNumber='$formnumber' limit 1","refNumber");
	//facility ID
	$facilityID=0;
	$facilityID=getDetailedTableInfo2("vl_forms_clinicalrequest_dispatch","refNumber='$refNumber' limit 1","facilityID");
	if($facilityID) {
		//load facilities
		$facilities=0;
		$facilities="<select name=\"$fieldID\" id=\"$fieldID\" class=\"search\" onchange=\"getHubDistrict(),checkForHubDistrict(), loadArtHistory(document.$formName.artNumber,document.$formName.facilityID.value)\">";
		$query=0;
		$query=mysqlquery("select * from vl_facilities where facility!='' order by facility");
		$facilities.="<option value=\"$facilityID\" selected=\"selected\">".getDetailedTableInfo2("vl_facilities","id='$facilityID' limit 1","facility")."</option>";
		if(mysqlnumrows($query)) {
			while($q=mysqlfetcharray($query)) {
				$facilities.="<option value=\"$q[id]\">$q[facility]</option>";
			}
		}
		$facilities.="</select>";
		//load responses
		$objResponse->addAssign("$facilityIDField","innerHTML",$facilities);
		$objResponse->addScript("checkForHubDistrict()");
		$objResponse->addScript("loadArtHistory(document.$formName.artNumber,'$facilityID')");
	}
	return $objResponse->getXML();
}
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:36,代码来源:functions.x.samples.php

示例14: queryTableInfo

/**
* function to query a table using the standard $query=mysqlquery("select statement")
* @param: $q
* @param: $field - which field should we return
*/
function queryTableInfo($q,$field) {
	$query=0;
	$query=mysqlquery("$q");
	if(!mysqlerror()) {
		if(mysqlnumrows($query)) {
			$q=array();
			$return=array();
			while($q=mysqlfetcharray($query)) {
				$return[]=$q["$field"];
			}
			return $return;
		}
	}
}
开发者ID:CHAIUganda,项目名称:ViralLoad,代码行数:19,代码来源:functions.misc.php


注:本文中的mysqlfetcharray函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。