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


PHP PdoDataAccess::runquery方法代码示例

本文整理汇总了PHP中PdoDataAccess::runquery方法的典型用法代码示例。如果您正苦于以下问题:PHP PdoDataAccess::runquery方法的具体用法?PHP PdoDataAccess::runquery怎么用?PHP PdoDataAccess::runquery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PdoDataAccess的用法示例。


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

示例1: newTable

function newTable()
{
    $query = "insert into rp_base_tables(table_name, description) values(?,?)";
    PdoDataAccess::runquery($query, array($_POST["table_name"], $_POST["description"]));
    echo "true";
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:7,代码来源:ReportGenerator.data.php

示例2: array

 function change_state()
 {
     $whereParams = array();
     $whereParams[":py"] = $this->PayYear;
     $whereParams[":pm"] = $this->PayMonth;
     if ($this->PersonType == 102) {
         $pt = " in ( 1,2,3) ";
     } else {
         if ($this->PersonType == 100) {
             $pt = " in ( 1,2,3,5,100 ) ";
         } else {
             $pt = $this->PersonType;
         }
     }
     $query = " update SalaryItemReport\r\n                                  set state = " . $this->state . "\r\n                                                 where PayYear = :py and PayMonth = :pm and PersonType {$pt}  ";
     $result = parent::runquery($query, $whereParams);
     if ($result === false) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_update;
     $daObj->MainObjectID = $this->PayMonth;
     $daObj->SubObjectID = $this->state;
     $daObj->TableName = "SalaryItemReport";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:27,代码来源:salary_item_report.class.php

示例3: changePass

function changePass()
{
    require_once '../../../header.inc.php';
    require_once inc_response;
    require_once inc_dataReader;
    $pdoAcc = PdoDataAccess::getPdoObject(config::$db_servers['master']["host"], config::$db_servers['master']["framework_user"], config::$db_servers['master']["framework_pass"], "framework");
    $dt = PdoDataAccess::runquery("select * from AccountSpecs \n\t\t\t\t\t\t\t\t\t\twhere personID=:psid", array(":psid" => $_SESSION['PersonID']), $pdoAcc);
    if (count($dt) == 0) {
        echo "false";
        die;
    }
    $password = md5($_POST["cur_pass"]);
    $stored_seed = substr($dt[0]["pswd1"], 40, 10);
    if (sha1($stored_seed . $password . $stored_seed) . $stored_seed != $dt[0]["pswd1"]) {
        echo "CurPassError";
        die;
    }
    $seed = '';
    $password2 = md5($_POST["new_pass"]);
    for ($i = 1; $i <= 10; $i++) {
        $seed .= substr('0123456789abcdef', rand(0, 15), 1);
    }
    PdoDataAccess::RUNQUERY("update AccountSpecs set pswd1=:pswd where personID=:psid", array(":pswd" => sha1($seed . $password2 . $seed) . $seed, ":psid" => $_SESSION['PersonID']), $pdoAcc);
    if (ExceptionHandler::GetExceptionCount() != 0) {
        echo "CurPassError";
        die;
    }
    //PdoDataAccess::AUDIT("AccountSpecs","تغییر رمز عبور", "");
    echo "true";
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:change_pass.php

示例4: CountMiscDoc

 static function CountMiscDoc($where = "", $whereParam = array())
 {
     $query = " select count(*) from person_misc_docs ";
     $query .= $where != "" ? " where " . $where : "";
     $temp = parent::runquery($query, $whereParam);
     return $temp[0][0];
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:7,代码来源:misc_doc.class.php

示例5: simulate_bime

 public static function simulate_bime($pay_year, $pay_month, $payment_type = NULL)
 {
     $e_date = "31-" . $pay_month . "-" . $pay_year;
     $end_month_date = DateModules::shamsi_to_miladi($e_date);
     $s_date = "1-" . $pay_month . "-" . $pay_year;
     $start_month_date = DateModules::shamsi_to_miladi($s_date);
     $worker_month_day = 30;
     $actual_month_day = DateModules::get_month_dayno($pay_year, $pay_month);
     //...................................
     PdoDataAccess::runquery("DROP TABLE IF EXISTS temp_insure_include_sum ");
     PdoDataAccess::runquery(" DROP TABLE IF EXISTS temp_limit_staff ");
     PdoDataAccess::runquery(" CREATE TEMPORARY TABLE temp_limit_staff AS\r\n\t\t\t\t\t\t\t\tSELECT DISTINCT s.staff_id , s.person_type\r\n\t\t\t\t\t\t\t\tFROM staff s\r\n\t\t\t\t\t\t\t\t\tINNER JOIN staff_include_history si\r\n\t\t\t\t\t\t\t\t\t\tON (s.staff_id = si.staff_id AND si.start_date <= ('{$end_month_date}') AND (si.end_date IS NULL OR si.end_date >= ('{$end_month_date}'))) \r\n\t\t\t\t\t\t\t\tWHERE si.insure_include = 1 ");
     PdoDataAccess::runquery("ALTER TABLE temp_limit_staff ADD INDEX (staff_id)");
     PdoDataAccess::runquery(" CREATE TEMPORARY table temp_insure_include_sum AS\r\n\t\t\t\t\t\t\t\tSELECT s.staff_id ,\r\n\t\t\t\t\t\t\t\t\t\t0 value,\r\n\t\t\t\t\t\t\t\t\t\tsum(pi.pay_value) + CASE WHEN sum(pi.diff_pay_value * pi.diff_value_coef) < 0 THEN 0 ELSE sum(pi.diff_pay_value * pi.diff_value_coef) END param1 ,\r\n\t\t\t\t\t\t\t\t\t\t0 param2 ,\r\n\t\t\t\t\t\t\t\t\t\t0 param3 , \r\n\t\t\t\t\t\t\t\t\t\tCASE WHEN s.person_type = " . HR_WORKER . " THEN {$worker_month_day} ELSE {$actual_month_day} END month_days\r\n\t\t\t\t\t\t\t\tFROM payment_items pi\r\n\t\t\t\t\t\t\t\tINNER JOIN salary_item_types sit\r\n\t\t\t\t\t\t\t\t\tON (pi.salary_item_type_id = sit.salary_item_type_id AND \r\n\t\t\t\t\t\t\t\t\t\tsit.credit_topic = " . CREDIT_TOPIC_1 . " AND \r\n\t\t\t\t\t\t\t\t\t\tsit.insure_include = 1)\r\n\t\t\t\t\t\t\t\tINNER JOIN temp_limit_staff s\r\n\t\t\t\t\t\t\t\t\tON (s.staff_id = pi.staff_id)\r\n\t\t\t\t\t\t\t\tWHERE pi.pay_year = ({$pay_year}) AND \r\n\t\t\t\t\t\t\t\t\tpi.pay_month = ({$pay_month}) AND \r\n\t\t\t\t\t\t\t\t\tpi.payment_type = 1\r\n\t\t\t\t\t\t\t\t\t{$payment_type_where}\r\n\t\t\t\t\t\t\t\tGROUP BY\r\n\t\t\t\t\t\t\t\tstaff_id; ");
     PdoDataAccess::runquery("ALTER TABLE temp_insure_include_sum ADD INDEX (staff_id)");
     $max_daily_salary_insure_include = manage_salary_params::get_salaryParam_value("", 100, SPT_MAX_DAILY_SALARY_INSURE_INCLUDE, $start_month_date);
     PdoDataAccess::runquery(" UPDATE temp_insure_include_sum\r\n\t\t\t\t\t\t\t  SET param1 = {$max_daily_salary_insure_include} * {$worker_month_day} \r\n\t\t\t\t\t\t\t  WHERE param1 > {$max_daily_salary_insure_include} * {$worker_month_day} ");
     //استخراج درصد بیمه بیکاری سهم کارفرما
     $res = PdoDataAccess::runquery("SELECT value\r\n\t\t\t\t\t\t\t\t\tFROM salary_params\r\n\t\t\t\t\t\t\t\t\t\tWHERE from_date <= '" . $start_month_date . "' AND\r\n\t\t\t\t\t\t\t\t\t\t\tto_date >= '" . $end_month_date . "' AND person_type =100 AND \r\n\t\t\t\t\t\t\t\t\t\t\tparam_type = " . SPT_UNEMPLOYMENT_INSURANCE_VALUE);
     $unemployment_insurance_value = $res[0]['value'];
     //استخراج درصد بیمه سهم شخص
     $res = PdoDataAccess::runquery("SELECT value\r\n\t\t\t\t\t\t\t\t\tFROM salary_params\r\n\t\t\t\t\t\t\t\t\tWHERE from_date <= '" . $start_month_date . "' AND\r\n\t\t\t\t\t\t\t\t\t\t\tto_date >= '" . $end_month_date . "' AND person_type =100 AND \r\n\t\t\t\t\t\t\t\t\t\t\tparam_type = " . SPT_SOCIAL_SUPPLY_INSURE_PERSON_VALUE);
     $person_value = $res[0]['value'];
     //استخراج درصد بیمه سهم کارفرما
     $res = PdoDataAccess::runquery("SELECT value\r\n\t\t\t\t\t\t\t\t\tFROM salary_params\r\n\t\t\t\t\t\t\t\t\tWHERE from_date <= '" . $start_month_date . "' AND\r\n\t\t\t\t\t\t\t\t\t\t\tto_date >= '" . $end_month_date . "' AND person_type =100 AND \r\n\t\t\t\t\t\t\t\t\t\t\tparam_type = " . SPT_SOCIAL_SUPPLY_INSURE_EMPLOYER_VALUE);
     $employmer_value = $res[0]['value'];
     PdoDataAccess::runquery(" UPDATE temp_insure_include_sum\r\n\t\t\t\t\t\t\t\tSET value =  param1 * {$person_value} ,\r\n\t\t\t\t\t\t\t\t\tparam2 = param1 * {$employmer_value} ,\r\n\t\t\t\t\t\t\t\t\tparam3 = param1 * {$unemployment_insurance_value} \r\n\t\t\t\t\t\t\t\tWHERE (1=1)");
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:28,代码来源:salary_utils.php

示例6: get_base

 /**
  * این تابع پایه استاد را بر می گرداند
  * @param miladiDate $ToDate : اگر این پارامتر به تابع فرستاده شود تابع پایه استاد تا قبل این تاریخ را بر می گرداند
  */
 static function get_base($PersonID, $ToDate = "")
 {
     $base = 1;
     $education_level_rec = manage_person_education::GetEducationLevelByDate($PersonID, $ToDate);
     if ($education_level_rec['university_id'] == 4) {
         $base = 3;
     }
     if ($education_level_rec['max_education_level'] == EDUCATION_LEVEL_MS && $education_level_rec['burse'] == 1) {
         $base += 1;
     }
     if ($education_level_rec['max_education_level'] == EDUCATION_LEVEL_PHD && $education_level_rec['burse'] == 1) {
         $base += 3;
     }
     $query = "\r\n\t\t\tSELECT  PersonID,\r\n\t\t            personel_relation,\r\n\t\t            devotion_type,\r\n\t\t            sum(amount) sum_amount\r\n\t\t\r\n\t\t    FROM \tperson_devotions\r\n\t\t\r\n\t\t    WHERE PersonID = {$PersonID} AND\r\n\t\t          personel_relation = 1 AND\r\n\t\t          devotion_type = 4\r\n\t\t\r\n\t\t    GROUP BY PersonID, personel_relation, devotion_type";
     $temp = PdoDataAccess::runquery($query);
     if (count($temp) != 0) {
         $base += floor($temp[0]['sum_amount'] / 360);
     }
     $query = "\r\n\t\t\tSELECT  PersonID,\r\n\t\t            military_type\r\n\t\t    FROM \tpersons\r\n\t\t    WHERE PersonID = {$PersonID}";
     $temp = PdoDataAccess::runquery($query);
     if (count($temp) != 0 && $temp[0]['military_type'] == 12) {
         $base += 1;
     }
     return $base;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:29,代码来源:prof.class.php

示例7: DatesAreValid

 function DatesAreValid()
 {
     $dt = PdoDataAccess::runquery("select * from ATN_PersonShifts\r\n\t\t\twhere PersonID=:p \r\n\t\t\tAND ( :f between FromDate AND ToDate OR :t between FromDate AND ToDate ) AND RowID <> :r", array(":p" => $this->PersonID, ":r" => $this->RowID, ":f" => DateModules::shamsi_to_miladi($this->FromDate, "-"), ":t" => DateModules::shamsi_to_miladi($this->ToDate, "-")));
     if (count($dt) > 0) {
         ExceptionHandler::PushException("شیفت انتخاب شده دارای تداخل زمانی میباشد");
         return false;
     }
     /*$ShiftObj = new ATN_shifts($this->ShiftID);
     		
     		$dt = PdoDataAccess::runquery("select * from ATN_PersonShifts join ATN_shifts using(ShiftID)
     			where PersonID=:p 
     			AND ( (:s between FromTime AND ToTime) OR (:e between FromTime AND ToTime) ) AND RowID <> :r 
     			AND ( (:f between FromDate AND if(ToDate='0000-00-00','4000-00-00',ToDate) ) 
     				OR (:t between FromDate AND if(ToDate='0000-00-00','4000-00-00',ToDate) ) )", 
     			array(":p" => $this->PersonID, ":s" => $ShiftObj->FromTime, 
     				  ":e" => $ShiftObj->ToTime, ":r" => $this->RowID,
     				  ":f" => DateModules::shamsi_to_miladi($this->FromDate), 
     				  ":t" => DateModules::shamsi_to_miladi($this->ToDate)));
     
     		if(count($dt) > 0)
     		{
     			ExceptionHandler::PushException("شیفت های این فرد با یکدیگر دارای تداخل ساعتی می باشند");;
     			return false;
     		}		*/
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:26,代码来源:shift.class.php

示例8: Remove

 function Remove($All = "")
 {
     $query = " select * from evaluation_lists where list_id = " . $this->list_id . " and doc_state = 3 ";
     $tmp2 = parent::runquery($query);
     if (count($tmp2) > 0) {
         parent::PushException("این لیست تایید واحد مرکزی می باشد .");
         return false;
     } else {
         if ($All == "true") {
             $result = parent::delete("evaluation_list_items", "list_id=?", array($this->list_id));
         } else {
             $result = parent::delete("evaluation_list_items", "list_id =? and ListItemID=? ", array($this->list_id, $this->ListItemID));
         }
     }
     if (!$result) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_delete;
     $daObj->MainObjectID = $this->list_id;
     $daObj->SubObjectID = $this->ListItemID;
     $daObj->TableName = "evaluation_list_items";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:25,代码来源:evaluation_list_items.class.php

示例9: CountPersonJob

 static function CountPersonJob($where = "", $whereParam = array())
 {
     $query = " select count(*)                               \r\n\t\t\t\t\t\tfrom PersonJobs \r\n\t\t\t\t\t\t\t\twhere (1=1) ";
     $query .= $where != "" ? " AND " . $where : "";
     $temp = parent::runquery($query, $whereParam);
     return $temp[0][0];
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:7,代码来源:job_history.class.php

示例10: Remove

 function Remove()
 {
     if ($this->list_type == 9) {
         $tblName = "mission_list_items";
     } else {
         $tblName = "pay_get_list_items";
     }
     $query = " select * from " . $tblName . " where list_id = " . $this->list_id;
     $tmp = parent::runquery($query);
     $query = " select * from pay_get_lists where list_id = " . $this->list_id . " and doc_state = 3 ";
     $tmp2 = parent::runquery($query);
     if (count($tmp) > 0) {
         parent::PushException("این لیست شامل مجموعه ای از افراد می باشد .");
         return false;
     } else {
         if (count($tmp2) > 0) {
             parent::PushException("این لیست تایید واحد مرکزی می باشد .");
             return false;
         } else {
             $result = parent::delete("pay_get_lists", "list_id=?", array($this->list_id));
         }
     }
     if (!$result) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_delete;
     $daObj->MainObjectID = $this->list_id;
     $daObj->TableName = "pay_get_lists";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:32,代码来源:pay_get_lists.class.php

示例11: GetTreeNodes

function GetTreeNodes()
{
    $LetterID = $_REQUEST["LetterID"];
    $creator = PdoDataAccess::runquery("\r\n\t\tselect PersonID,\r\n\t\t\tconcat_ws(' ',fname, lname,CompanyName) text, \r\n\t\t\t'true' as leaf, 'true' expanded,'user' iconCls,\r\n\t\t\tl.RegDate\r\n\t\tfrom OFC_letters l join BSC_persons p using(PersonID) where LetterID=?", array($LetterID));
    $index = 1;
    $returnArray = array();
    $refArray = array();
    $creator[0]["id"] = $index++;
    $creator[0]["text"] .= " [ " . substr($creator[0]["RegDate"], 10, 6) . " &nbsp;&nbsp; " . DateModules::miladi_to_shamsi($creator[0]["RegDate"]) . "\t]";
    $returnArray[] = $creator[0];
    $refArray[$creator[0]["PersonID"]] =& $returnArray[count($returnArray) - 1];
    $nodes = PdoDataAccess::runquery("\r\n\t\tselect FromPersonID ,ToPersonID, SendDate,\r\n\t\t\tconcat_ws(' ',fname, lname,CompanyName,' - ',InfoDesc) text, \r\n\t\t\tconcat('<b>توضیحات ارجاع : </b>' ,replace(SendComment,'\n','<br>')) qtip,\r\n\t\t\t'true' as leaf, 'true' expanded,'user' iconCls\r\n\t\tfrom OFC_send \r\n\t\t\tjoin BSC_persons p on(ToPersonID=PersonID) \r\n\t\t\tjoin BaseInfo bf on(bf.TypeID=12 AND SendType=InfoID)\r\n\t\twhere LetterID=?\r\n\t\torder by SendID", array($LetterID));
    foreach ($nodes as $row) {
        $row["id"] = $index++;
        $row["text"] .= " [ " . substr($row["SendDate"], 10, 6) . " &nbsp;&nbsp; " . DateModules::miladi_to_shamsi($row["SendDate"]) . " ]";
        $parentNode =& $refArray[$row["FromPersonID"]];
        if (!isset($parentNode["children"])) {
            $parentNode["children"] = array();
            $parentNode["leaf"] = "false";
        }
        $lastIndex = count($parentNode["children"]);
        $parentNode["children"][$lastIndex] = $row;
        $refArray[$row["ToPersonID"]] =& $parentNode["children"][$lastIndex];
    }
    $str = json_encode($returnArray);
    $str = str_replace('"children"', 'children', $str);
    $str = str_replace('"leaf"', 'leaf', $str);
    $str = str_replace('"iconCls"', 'iconCls', $str);
    $str = str_replace('"text"', 'text', $str);
    $str = str_replace('"id"', 'id', $str);
    $str = str_replace('"true"', 'true', $str);
    $str = str_replace('"false"', 'false', $str);
    echo $str;
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:35,代码来源:history.php

示例12: GetAccDoc

 function GetAccDoc($pdo = null)
 {
     $dt = PdoDataAccess::runquery("\r\n\t\t\tselect DocID from ACC_DocItems where SourceType=" . DOCTYPE_WARRENTY . " \r\n\t\t\tAND SourceID=? AND SourceID2=?", array($this->RequestID, $this->ReqVersion), $pdo);
     if (count($dt) == 0) {
         return 0;
     }
     return $dt[0][0];
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:8,代码来源:request.class.php

示例13: getCityName

 static function getCityName($city_id)
 {
     $query = "select * from cities where city_id=" . $city_id;
     $dt = parent::runquery($query);
     if (count($dt) != 0) {
         return $dt[0]["ptitle"];
     }
     return "";
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:9,代码来源:city.class.php

示例14: DeleteWST

 static function DeleteWST($id)
 {
     $arr = explode('-', $id);
     PdoDataAccess::runquery("delete from writ_subtypes where person_type=" . $arr[3] . " and writ_type_id=" . $arr[4] . " and writ_subtype_id=" . $arr[5]);
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_delete;
     $daObj->MainObjectID = $_POST["id"];
     $daObj->TableName = "writ_subtypes";
     $daObj->execute();
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:10,代码来源:writ_subtype.class.php

示例15: DeleteGroup

function DeleteGroup()
{
    $dt = PdoDataAccess::runquery("select * from LON_loans where GroupID=?", array($_POST["GroupID"]));
    if (count($dt) > 0) {
        echo Response::createObjectiveResponse(false, "");
        die;
    }
    PdoDataAccess::runquery("delete from BaseInfo where TypeID=1 AND InfoID=?", array($_POST["GroupID"]));
    echo Response::createObjectiveResponse(true, "");
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:11,代码来源:loan.data.php


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