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


PHP sqlQ函数代码示例

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


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

示例1: review_of_systems_report

function review_of_systems_report($pid, $encounter, $cols, $id)
{
    $count = 0;
    $data = formFetch("form_review_of_systems", $id);
    $sql = "SELECT name from form_review_of_systems_checks where foreign_id = '" . add_escape_custom($id) . "'";
    $results = sqlQ($sql);
    $data2 = array();
    while ($row = sqlFetchArray($results)) {
        $data2[] = $row['name'];
    }
    $data = array_merge($data, $data2);
    if ($data) {
        print "<table><tr>";
        foreach ($data as $key => $value) {
            if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
                continue;
            }
            if ($value == "on") {
                $value = "yes";
            }
            $key = ucwords(str_replace("_", " ", $key));
            if (is_numeric($key)) {
                $key = "check";
            }
            print "<td><span class=bold>{$key}: </span><span class=text>{$value}</span></td>";
            $count++;
            if ($count == $cols) {
                $count = 0;
                print "</tr><tr>\n";
            }
        }
    }
}
开发者ID:aaricpittman,项目名称:openemr,代码行数:33,代码来源:report.php

示例2: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->well_child = new FormWellChild($_POST['id']);
     parent::populate_object($this->well_child);
     $new_form = false;
     if (empty($_POST['id'])) {
         $new_form = true;
     }
     $this->well_child->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     if ($new_form) {
         addForm($GLOBALS['encounter'], "Well Child Visit", $this->well_child->id, "well_child", $GLOBALS['pid'], $_SESSION['userauthorized']);
     }
     if (!empty($_POST['cpt_code'])) {
         $sql = "select * from codes where code ='" . mysql_real_escape_string($_POST['cpt_code']) . "' order by id";
         $results = sqlQ($sql);
         $row = mysql_fetch_array($results);
         if (!empty($row)) {
             addBilling(date("Ymd"), 'CPT4', $row['code'], $row['code_text'], $_SESSION['pid'], $_SESSION['userauthorized'], $_SESSION['authUserID'], $row['modifier'], $row['units'], $row['fee']);
         }
     }
     $_POST['process'] = "";
     return;
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:29,代码来源:C_FormWellChild.class.php

示例3: populate

 function populate()
 {
     parent::populate();
     $sql = "SELECT name from form_evaluation_checks where foreign_id = '" . add_escape_custom($this->id) . "'";
     $results = sqlQ($sql);
     while ($row = sqlFetchArray($results)) {
         $this->checks[] = $row['name'];
     }
 }
开发者ID:aaricpittman,项目名称:openemr,代码行数:9,代码来源:FormEvaluation.class.php

示例4: populate

 function populate()
 {
     parent::populate();
     $sql = "SELECT name from form_review_of_systems_checks where foreign_id = '" . mysql_real_escape_string($this->id) . "'";
     $results = sqlQ($sql);
     while ($row = mysql_fetch_array($results, MYSQL_ASSOC)) {
         $this->checks[] = $row['name'];
     }
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:9,代码来源:FormReviewOfSystems.class.php

示例5: insurance_numbers_factory

 function insurance_numbers_factory($provider_id)
 {
     $ins = array();
     $sql = "SELECT id FROM " . $this->_table . " where provider_id = '" . $provider_id . "' order by insurance_company_id";
     $results = sqlQ($sql);
     while ($row = sqlFetchArray($results)) {
         $ins[] = new InsuranceNumbers($row['id']);
     }
     return $ins;
 }
开发者ID:aaricpittman,项目名称:openemr,代码行数:10,代码来源:InsuranceNumbers.class.php

示例6: providers_factory

 function providers_factory($sort = "ORDER BY lname,fname")
 {
     $psa = array();
     $sql = "SELECT id FROM " . $this->_table . " where authorized = 1 " . $sort;
     $results = sqlQ($sql);
     while ($row = mysql_fetch_array($results)) {
         $psa[] = new Provider($row['id']);
     }
     return $psa;
 }
开发者ID:stephen-smith,项目名称:openemr,代码行数:10,代码来源:Provider.class.php

示例7: factory_company

 function factory_company($foreign_id = "")
 {
     if (empty($foreign_id)) {
         $foreign_id = "like '%'";
     } else {
         $foreign_id = " = '" . mysql_real_escape_string(strval($foreign_id)) . "'";
     }
     $a = new Address();
     $sql = "SELECT id FROM  " . $a->_table . " WHERE foreign_id " . $foreign_id;
     //echo $sql . "<bR />";
     $results = sqlQ($sql);
     //echo "sql: $sql";
     $row = mysql_fetch_array($results);
     if (!empty($row)) {
         $a = new Address($row['id']);
     }
     return $a;
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:18,代码来源:Company.class.php

示例8: factory_address

 static function factory_address($foreign_id = "")
 {
     if (empty($foreign_id)) {
         $foreign_id = "like '%'";
     } else {
         $foreign_id = " = '" . add_escape_custom(strval($foreign_id)) . "'";
     }
     $a = new Address();
     $sql = "SELECT id FROM  " . $a->_table . " WHERE foreign_id " . $foreign_id;
     //echo $sql . "<bR />";
     $results = sqlQ($sql);
     //echo "sql: $sql";
     $row = sqlFetchArray($results);
     if (!empty($row)) {
         $a = new Address($row['id']);
     }
     return $a;
 }
开发者ID:aaricpittman,项目名称:openemr,代码行数:18,代码来源:Address.class.php

示例9: factory_phone_numbers

 static function factory_phone_numbers($foreign_id = "")
 {
     if (empty($foreign_id)) {
         $foreign_id = "like '%'";
     } else {
         $foreign_id = " = '" . add_escape_custom(strval($foreign_id)) . "'";
     }
     $phone_numbers = array();
     $p = new PhoneNumber();
     $sql = "SELECT id FROM  " . $p->_table . " WHERE foreign_id " . $foreign_id . " ORDER BY type";
     //echo $sql . "<bR />";
     $results = sqlQ($sql);
     //echo "sql: $sql";
     while ($row = sqlFetchArray($results)) {
         $phone_numbers[] = new PhoneNumber($row['id']);
     }
     return $phone_numbers;
 }
开发者ID:juggernautsei,项目名称:openemr,代码行数:18,代码来源:PhoneNumber.class.php

示例10: populate

 function populate()
 {
     parent::populate();
     $sql = "SELECT name from form_hp_tje_checks where foreign_id = '" . add_escape_custom($this->id) . "'";
     $results = sqlQ($sql);
     while ($row = sqlFetchArray($results)) {
         $this->checks[] = $row['name'];
     }
     $sql = "SELECT doctor,specialty,tx_rendered,effectiveness,date from form_hp_tje_history where foreign_id = '" . add_escape_custom($this->id) . "'";
     $results = sqlQ($sql);
     while ($row = sqlFetchArray($results)) {
         $this->history[] = $row;
     }
     $sql = "SELECT nature_of_accident,injuries,date from form_hp_tje_previous_accidents where foreign_id = '" . add_escape_custom($this->id) . "'";
     $results = sqlQ($sql);
     while ($row = sqlFetchArray($results)) {
         $this->previous_accidents[] = $row;
     }
 }
开发者ID:aaricpittman,项目名称:openemr,代码行数:19,代码来源:FormHpTjePrimary.class.php

示例11: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->prosthesis = new FormProsthesis($_POST['id']);
     parent::populate_object($this->prosthesis);
     $this->prosthesis->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     addForm($GLOBALS['encounter'], "Prosthesis & Orthotics Form", $this->prosthesis->id, "prosthesis", $GLOBALS['pid'], $_SESSION['userauthorized']);
     if (!empty($_POST['cpt_code'])) {
         $sql = "select * from codes where code ='" . mysql_real_escape_string($_POST['cpt_code']) . "' order by id";
         $results = sqlQ($sql);
         $row = mysql_fetch_array($results);
         if (!empty($row)) {
             addBilling(date("Ymd"), 'CPT4', $row['code'], $row['code_text'], $_SESSION['pid'], $_SESSION['userauthorized'], $_SESSION['authUserID'], $row['modifier'], $row['units'], $row['fee']);
         }
     }
     $_POST['process'] = "";
     return;
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:23,代码来源:C_FormProsthesis.class.php

示例12: default_action_process

 function default_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $this->evaluation = new FormEvaluation($_POST['id']);
     parent::populate_object($this->evaluation);
     $this->evaluation->persist();
     if ($GLOBALS['encounter'] == "") {
         $GLOBALS['encounter'] = date("Ymd");
     }
     addForm($GLOBALS['encounter'], "Evaluation Form", $this->evaluation->id, "evaluation", $GLOBALS['pid'], $_SESSION['userauthorized']);
     if (!empty($_POST['cpt_code'])) {
         $sql = "select * from codes where code ='" . add_escape_custom($_POST['cpt_code']) . "' order by id";
         $results = sqlQ($sql);
         $row = sqlFetchArray($results);
         if (!empty($row)) {
             addBilling(date("Ymd"), 'CPT4', $row['code'], $row['code_text'], $_SESSION['pid'], $_SESSION['userauthorized'], $_SESSION['authUserID'], $row['modifier'], $row['units'], $row['fee']);
         }
     }
     $_POST['process'] = "";
     return;
 }
开发者ID:juggernautsei,项目名称:openemr,代码行数:23,代码来源:C_FormEvaluation.class.php

示例13: lab_results_messages

function lab_results_messages($set_pid, $rid, $provider_id = "")
{
    if ($provider_id != "") {
        $where = "AND id = '" . $provider_id . "'";
    }
    // Get all active users.
    $rez = sqlStatement("select id, username from users where username != '' AND active = '1' {$where}");
    for ($iter = 0; $row = sqlFetchArray($rez); $iter++) {
        $result[$iter] = $row;
    }
    if (!empty($result)) {
        foreach ($result as $user_detail) {
            unset($thisauth);
            // Make sure it is empty.
            // Check user authorization. Only send the panding review message to authorised user.
            // $thisauth = acl_check('patients', 'sign', $user_detail['username']);
            // Route message to administrators if there is no provider match.
            if ($provider_id == "") {
                $thisauth = acl_check('admin', 'super', $user_detail['username']);
            } else {
                $thisauth = true;
            }
            if ($thisauth) {
                // Send lab result message to the ordering provider when there is a new lab report.
                $userauthorized = formData("userauthorized");
                $pname = getPatientName($set_pid);
                $link = "<a href='../../orders/orders_results.php?review=1&set_pid={$set_pid}'" . " onclick='return top.restoreSession()'>here</a>";
                $note = "Patient {$pname}'s lab results have arrived. Please click {$link} to review them.<br/>";
                $note_type = "Lab Results";
                $message_status = "New";
                // Add pnote.
                $noteid = addPnote($set_pid, $note, $userauthorized, '1', $note_type, $user_detail['username']);
                sqlQ("update pnotes set message_status='" . $message_status . "' where id = '{$noteid}'");
            }
        }
    }
}
开发者ID:robonology,项目名称:openemr,代码行数:37,代码来源:lab_results_messages.php

示例14: UpdateTable

function UpdateTable($tablename, $pid_col, $oldvalue, $newvalue)
{
    global $commitchanges, $oemrdb;
    $sqlstmt = "select count(*) as numrows from " . $tablename . " where " . $pid_col . "='" . $oldvalue . "'";
    $qResults = sqlQ($sqlstmt);
    if ($qResults) {
        $row = sqlFetchArray($qResults);
        if ($row['numrows'] > 0) {
            $sqlstmt = "update " . $tablename . " set " . $pid_col . "='" . $newvalue . "' where " . $pid_col . "='" . $oldvalue . "'";
            if ($commitchanges == true) {
                $qResults = sqlQ($sqlstmt);
            }
            $rowsupdated = $GLOBALS['adodb']['db']->_affectedrows();
            echo "<li>";
            echo "" . $tablename . ": " . $rowsupdated . " row(s) updated<br>";
            echo "</li>";
        }
    }
}
开发者ID:fidabhittani,项目名称:openemr,代码行数:19,代码来源:mergerecords.php

示例15: insurance_companies_factory

 function insurance_companies_factory($city = "", $sort = "ORDER BY name, id")
 {
     if (empty($city)) {
         $city = "";
     } else {
         $city = " WHERE city = " . add_escape_custom($foreign_id);
     }
     $p = new InsuranceCompany();
     $icompanies = array();
     $sql = "SELECT p.id, a.city FROM  " . $p->_table . " as p INNER JOIN addresses as a on p.id = a.foreign_id " . $city . " " . add_escape_custom($sort);
     //echo $sql . "<bR />";
     $results = sqlQ($sql);
     //echo "sql: $sql";
     //print_r($results);
     while ($row = mysql_fetch_array($results)) {
         $icompanies[] = new InsuranceCompany($row['id']);
     }
     return $icompanies;
 }
开发者ID:sivarajankumar,项目名称:openemr,代码行数:19,代码来源:InsuranceCompany.class.php


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