本文整理汇总了PHP中mysqlquery函数的典型用法代码示例。如果您正苦于以下问题:PHP mysqlquery函数的具体用法?PHP mysqlquery怎么用?PHP mysqlquery使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mysqlquery函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMailMessage
/**
* function to get the status of the invite sent to the user
* @param: $contact
*/
function getMailMessage($name) {
$query=0;
$query=mysqlquery("select * from vl_emails_outgoing where lower(name)='".strtolower($name)."'");
if(mysqlnumrows($query)) {
return mysqlresult($query,0,'description');
}
}
示例2: logError
function logError($name,$description,$url,$user) {
global $datetime;
mysqlquery("insert into vl_errors
(name,description,url,user,created)
values
('$name','$description','$url','$user','$datetime')");
}
示例3: 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;
}
}
示例4: insertVLResults
function insertVLResults($machineType="", $values="", $repeats="", $merged_values=""){
$values = trim($values, ",");
$repeats = trim($repeats, ",");
$merged_values = trim($merged_values, ",");
if($machineType=="roche"){
mysqlquery("insert into vl_results_roche
(worksheetID,PatientName,PatientID,OrderNumber,OrderDateTime,
SampleID,SampleType,BatchID,Test,Result,Unit,Flags,AcceptedOp,
AcceptedDateTime,Comment,GeneralLotNumber,GeneralLotExpirationDate,
SamplePrepKitLotNumber,SamplePrepKitLotExpirationDate,PCRKitLotNumber,PCRKitExpirationDate,
LPCLowLimit,LPCHighLimit,MPCLowLimit,MPCHighLimit,
HPCLowLimit,HPCHighLimit,PreparationInstrumentID,PreparationStartDateTime,
PreparationEndDateTime,PreparationRackPos,PreparationRackID,PreparationRackType,
PreparationTubeID,PreparationTubeType,PreparationTubePos,PreparationBatchID,
AmplificationInstrumentID,AmplificationStartDateTime,AmplificationEndDateTime,AmplificationTCID,
AmplificationRackID,AmplificationRackType,AmplificationTubeID,AmplificationTubeType,
AmplificationTubePos,AmplificationBatchID,DetectionInstrumentID,DetectionStartDateTime,
DetectionEndDateTime,DetectionRackPos,DetectionRackID,DetectionRackType,
DetectionTubeID,DetectionTubeType,DetectionTubePos,DetectionBatchID,
IngredientCH1,IngredientCH2,IngredientCH3,IngredientCH4,
CTMElbowCH1,CTMElbowCH2,CTMElbowCH3,CTMElbowCH4,CTMRFICH1,CTMRFICH2,CTMRFICH3,
CTMRFICH4,CTMAFICH1,CTMAFICH2,CTMAFICH3,CTMAFICH4,CTMCalibCoeffa,CTMCalibCoeffb,
CTMCalibCoeffc,CTMCalibCoeffd,CASampleValue,QSCopy,CATarget1,CATarget2,
CATarget3,CATarget4,CATarget5,CATarget6,CAQS1,CAQS2,CAQS3,CAQS4,created,createdby)
values $values");
}elseif($machineType=="abbott"){
mysqlquery("insert into vl_results_abbott
(worksheetID, sampleLocation,sampleID,sampleType,assayName,
assayVersion,result,interpretation,flags,targetCycleNumber,icCycleNumber,
errorCodeDescription,assayCalibrationTime, reagentLotNumber,reagentLotExpirationDate,
controlLotNumber,controlExpirationDate, controlRange,calibratorLotNumber,
calibratorExpirationDate,calibratorLogConcentration, resultComment,targetMR,icMR,
created,createdby) values $values");
}
if(!empty($repeats)){
mysqlquery("insert into vl_logs_samplerepeats
(sampleID,oldWorksheetID,created,createdby)
values $repeats");
}
if(!empty($merged_values)){
mysqlquery("insert ignore into vl_results_merged
(machine,worksheetID,vlSampleID,resultAlphanumeric,
resultNumeric,suppressed,created,createdby)
values $merged_values ");
}
}
示例5:
?>
</select></td>
</tr>
</table>
</td>
<td style="padding: 0px 0px 0px 10px" align="right">Value:</td>
<td style="padding:0px 0px 0px 5px"><input type="text" name="suspectedTreatmentFailureValue" id="suspectedTreatmentFailureValue" value="<?php
echo $suspectedTreatmentFailureValue;
?>
" class="search_pre" size="7" maxlength="10" /></td>
<td align="right">Sample 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>
示例6: 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;
示例7: logResultOverride
/**
* function to log result overrides
*/
function logResultOverride($sampleID,$worksheetID,$result) {
global $datetime,$trailSessionUser;
//validate
$sampleID=validate($sampleID);
$worksheetID=validate($worksheetID);
$result=validate($result);
$id=0;
$id=getDetailedTableInfo2("vl_results_override","sampleID='$sampleID' and worksheetID='$worksheetID'","id");
//avoid duplicates
if(!$id) {
//insert into vl_results_override
mysqlquery("insert into vl_results_override
(sampleID,worksheetID,result,created,createdby)
values
('$sampleID','$worksheetID','$result','$datetime','$trailSessionUser')");
} else {
//log table change
logTableChange("vl_results_override","result",$id,getDetailedTableInfo2("vl_results_override","id='$id'","result"),$result);
//update vl_results_override
mysqlquery("update vl_results_override set result='$result' where id='$id'");
}
}
示例8: monthname
?>
<tr>
<td><strong>Total Data Removals since March-2014: </strong></td>
</tr>
<tr>
<td><strong>Removals per Month: </strong></td>
</tr>
<tr>
<td><table width="100%" border="1" class="vl">
<tr bgcolor="#ECECFF">
<td width="74%"><strong>Month, Year</strong></td>
<td width="26%"><strong>Removals</strong></td>
</tr>
<?
$squery=0;
$squery=mysqlquery("select monthname(created) theMonth, year(created) theYear, count(*) stat from vl_logs_removals group by theMonth, theYear order by created");
if(mysqlnumrows($squery)) {
$sq=array();
$stotal=0;
$scount=1;
while($sq=mysqlfetcharray($squery)) {
if($scount%2) {
$scolor="#FFFFFF";
} else {
$scolor="#F4F4F4";
}
?>
<tr bgcolor="<?php
echo $scolor;
?>
">
示例9: isDateInDB
function isDateInDB($date) {
$query=0;
$query=mysqlquery("select * from vl_calendar where eventDate='$date'");
if(mysqlnumrows($query)) {
return 1;
}
}
示例10:
?>
">
<? } ?>
<input name="act" type="hidden" id="act" value="atbtreatmentphase">
<input name="option" type="hidden" id="option" value="<?php
echo $task;
?>
">
</td>
</tr>
</table>
</form>
<?
$query=0;
$query=mysqlquery("select * from vl_appendix_tbtreatmentphase order by position");
$num=0;
$num=mysqlnumrows($query);
if($num) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="vl">
<tr>
<td style="padding:5px 0px" align="center">
<div style="height: 200px; border: 1px solid #ccccff; overflow: auto">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="vl">
<tr>
<td class="vl_tdsub" width="1%"><strong>#</strong></td>
<td class="vl_tdsub" width="60%"><strong>Appendix</strong></td>
<td class="vl_tdsub" width="10%"><strong>Samples</strong></td>
<td class="vl_tdsub" width="29%"> </td>
</tr>
示例11: while
<td style="padding:0px 0px 0px 5px"><select name="dispatchedDateYear" id="dispatchedDateYear" class="search">
<?
for($j=getFormattedDateYear($oldDispatchedDate?$oldDispatchedDate:$datetime);$j>=(getCurrentYear()-10);$j--) {
echo "<option value=\"$j\">$j</option>";
}
?>
</select></td>
</tr>
</table></td>
</tr>
<tr>
<td>To Facility (Destination) <font class="vl_red">*</font></td>
<td><select name="facilityID" id="facilityID" class="search">
<?
$query=0;
$query=mysqlquery("select * from vl_facilities where facility!='' order by facility");
if($facilityID) {
echo "<option value=\"$facilityID\" selected=\"selected\">".getDetailedTableInfo2("vl_facilities","id='$facilityID' limit 1","facility")."</option>";
} else {
echo "<option value=\"\" selected=\"selected\"></option>";
}
if(mysqlnumrows($query)) {
while($q=mysqlfetcharray($query)) {
echo "<option value=\"$q[id]\">$q[facility]</option>";
}
}
?>
</select>
<script>
var z = dhtmlXComboFromSelect("facilityID");
z.enableFilteringMode(true);
示例12: getDetailedTableInfo2
<input name="regionID" type="hidden" id="regionID" value="<?php
echo $regionID;
?>
">
<input name="option" type="hidden" id="option" value="<?php
echo $task;
?>
">
</td>
</tr>
</table>
</form>
<?
$query=0;
$query=mysqlquery("select * from vl_districts where regionID='$regionID' order by district");
$num=0;
$num=mysqlnumrows($query);
if($num) {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="vl">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="vl_tdsub" style="padding-left:20px"><strong>Districts in <?php
echo getDetailedTableInfo2("vl_regions", "id='{$regionID}'", "region");
?>
Region</strong></td>
</tr>
</table>
示例13:
">
<? } ?>
<input name="act" type="hidden" id="act" value="permissions">
<input name="option" type="hidden" id="option" value="<?php
echo $task;
?>
">
</td>
</tr>
</table>
</form>
<? } ?>
<?
$query=0;
$query=mysqlquery("select * from vl_users order by names,email");
$num=0;
$num=mysqlnumrows($query);
if($num && $task=="add") {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="vl">
<tr>
<td style="border-bottom:1px solid #cccccc; padding-bottom:10px">Select User Account</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="vl_tdsub" style="padding-left:16px" width="58%"><strong>Names</strong></td>
<td class="vl_tdsub" width="42%"><strong>Permissions</strong></td>
</tr>
示例14: date
date(created)>='2015-12-27'
group by vlSampleID having num=1");
if(mysqlnumrows($query)) {
while($q=mysqlfetcharray($query)) {
//get the id
$id=0;
$id=getDetailedTableInfo2("vl_results_override","sampleID='$q[vlSampleID]' and date(created)>='2015-12-27' order by created desc limit 1","id");
//log and remove record
logDataRemoval("delete from vl_results_override where id='$id'");
mysqlquery("delete from vl_results_override where id='$id'");
}
}
*/
//task 4: a procedure to override key abbott results
$query=0;
$query=mysqlquery("select sampleID, count(id) num, max(created) dateCreated from vl_results_abbott
where
result='3119 A no clot exit detected error was encountered by the Liquid Handler.' and
sampleID not in (select sampleID from vl_results_override)
group by sampleID having num>1 order by num desc");
if(mysqlnumrows($query)) {
while($q=mysqlfetcharray($query)) {
//log result override
logResultOverride($q["sampleID"],getDetailedTableInfo2("vl_results_abbott","sampleID='$q[sampleID]' and created='$q[dateCreated]' limit 1","worksheetID"),$default_resultFailureNewSampleMessage);
}
}
//task 5: fix a result typo
mysqlquery("update vl_results_override set result='There is No Result Given. The Test Failed the Quality Control Criteria. We advise you send a new sample.' where result='There is No Result Given. The Test Failed the Quality Control Criteria. We advise you send a a new sample.'");
?>
示例15: alterUserSetting
/**
* function to change a user's setting
* @param: $userID
* @param: $setting
* @param: $value
*/
function alterUserSetting($userID,$setting,$value) {
//globals
global $datetime,$trailSessionUser;
//does user have a setting account?
$query=0;
$query=mysqlquery("select * from vl_users_settings where userID='$userID'");
if(mysqlnumrows($query)) {
//log table change
logTableChange("vl_users_settings","$setting",getDetailedTableInfo2("vl_users_settings","userID='$userID'","id"),getDetailedTableInfo2("vl_users_settings","userID='$userID'","$setting"),$value);
//update
mysqlquery("update vl_users_settings set $setting='$value' where userID='$userID'");
} else {
//insert
mysqlquery("insert into vl_users_settings
(userID,$setting,created,createdby)
values
('$userID','$value','$datetime','$trailSessionUser')");
}
}