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


PHP executeSelect函数代码示例

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


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

示例1: validateDeletion

function validateDeletion($var_list)
{
    global $conn;
    $sql = "select nTicketId from sptbl_tickets where nDeptId IN({$var_list})";
    $rs = executeSelect($sql, $conn);
    if (mysql_num_rows($rs) > 0) {
        return false;
    } else {
        $sqlparentcheck = "select nDeptId from sptbl_depts where nDeptParent IN({$var_list})";
        $rs1 = executeSelect($sqlparentcheck, $conn);
        if (mysql_num_rows($rs1) > 0) {
            return false;
        }
    }
    //check category table
    $sqlcattcheck = "select nDeptId from sptbl_categories where nDeptId IN({$var_list})";
    $rs2 = executeSelect($sqlcattcheck, $conn);
    if (mysql_num_rows($rs2) > 0) {
        return false;
    }
    /*
    		$sqlstaffdeptcheck="select nDeptId from sptbl_staffdept where nDeptId IN ($var_list) ";
    		$rs3 = executeSelect($sqlstaffdeptcheck,$conn);
    		if(mysql_num_rows($rs3)>0){
    		        return false;
    		}  
    */
    return true;
}
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:29,代码来源:departments.php

示例2: validateDeletion

function validateDeletion($var_list)
{
    global $conn;
    $sql = "Select nTicketId from sptbl_tickets where vStatus !='closed' AND nUserId IN({$var_list}) ";
    if (mysql_num_rows(executeSelect($sql, $conn)) > 0) {
        return false;
    } else {
        return true;
    }
}
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:10,代码来源:users.php

示例3: getSuscriptores

 public function getSuscriptores($ticket)
 {
     $sql = "select * from acsa_tickets_suscripcion where ticket_id='" . mysql_real_escape_string($ticket) . "' and estado='1'";
     $result = executeSelect($sql, $this->conn);
     if (mysql_num_rows($result) > 0) {
         return $result;
     } else {
         return null;
     }
 }
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:10,代码来源:suscripcion.php

示例4: validateDeletion

function validateDeletion($var_list)
{
    global $conn;
    $sql = "Select nCompId from sptbl_depts where nCompId IN({$var_list})";
    if (mysql_num_rows(executeSelect($sql, $conn)) > 0) {
        return false;
    } else {
        return true;
    }
}
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:10,代码来源:companies.php

示例5: hasChildren

function hasChildren($catid)
{
    global $conn;
    $sqlparentcheck = "select nCatId from sptbl_categories where nParentId='" . mysql_real_escape_string($catid) . "'";
    $rs = executeSelect($sqlparentcheck, $conn);
    if (mysql_num_rows($rs) > 0) {
        return true;
    } else {
        return false;
    }
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:11,代码来源:kbcategories.php

示例6: validateAddition

function validateAddition($var_list)
{
    global $conn;
    $sql = "Select vLookUpValue from sptbl_lookup where vLookUpName='Attachments' and vLookUpValue='{$var_list}'";
    $var_result = executeSelect($sql, $conn);
    if (mysql_num_rows($var_result) > 0) {
        return false;
    } else {
        return true;
    }
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:11,代码来源:attachments.php

示例7: shutdownFunction

function shutdownFunction()
{
    //  echo '<script type="text/javascript">alert("hello!");</script>';
    $sql = " Select * from sptbl_lookup where vLookUpName IN('Post2PostGap','MailFromName','MailFromMail',";
    $sql .= "'MailReplyName','MailReplyMail','Emailfooter','Emailheader','AutoLock','HelpdeskTitle','SMTPSettings','SMTPServer','SMTPPort')";
    $conn = getConnection();
    $result = executeSelect($sql, $conn);
    if (mysql_num_rows($result) > 0) {
        while ($row = mysql_fetch_array($result)) {
            switch ($row["vLookUpName"]) {
                case "MailFromName":
                    $var_fromName = $row["vLookUpValue"];
                    break;
                case "MailFromMail":
                    $var_fromMail = $row["vLookUpValue"];
                    break;
                case "MailReplyName":
                    $var_replyName = $row["vLookUpValue"];
                    break;
                case "MailReplyMail":
                    $var_replyMail = $row["vLookUpValue"];
                    break;
                case "Emailfooter":
                    $var_emailfooter = $row["vLookUpValue"];
                    break;
                case "Emailheader":
                    $var_emailheader = $row["vLookUpValue"];
                    break;
                case "AutoLock":
                    $var_autoclock = $row["vLookUpValue"];
                    break;
                case "HelpdeskTitle":
                    $var_helpdeskname = $row["vLookUpValue"];
                    break;
            }
        }
    }
    mysql_free_result($result);
    $subject = handleError();
    if ($subject != 0) {
        $Headers = "From: {$var_fromName} <{$var_fromMail}>\n";
        $Headers .= "Reply-To: {$var_replyName} <{$var_replyMail}>\n";
        $Headers .= "MIME-Version: 1.0\n";
        $Headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
        if ($_SESSION["sess_smtpsettings"] == 1) {
            $var_smtpserver = $_SESSION["sess_smtpserver"];
            $var_port = $_SESSION["sess_smtpport"];
            SMTPMail($var_fromMail, 'arun.s@armiasystems.com', $var_smtpserver, $var_port, 'Error from Staff', $subject);
        } else {
            @mail('arun.s@armiasystems.com', 'Error from Staff', $subject, $Headers);
        }
    }
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:53,代码来源:applicationheader.php

示例8: getClientesCompuestosTotvs

/**
 * Trae los clientes compuestos del totvs de la base de datos SQL
 * @param bool $id
 */
function getClientesCompuestosTotvs($codigocc)
{
    $sql = "SELECT * FROM `acsa_totvs_clientes_compuestos` WHERE codigocc = '" . $codigocc . "'";
    $conn = getConnection();
    $result = executeSelect($sql, $conn);
    $clientes = array();
    if (mysql_num_rows($result) > 0) {
        while ($row = mysql_fetch_array($result)) {
            $clientes[] = array('codigocc' => trim($row['codigocc']), 'lojacc' => trim($row['lojacc']), 'codigo' => trim($row['codigo']), 'loja' => trim($row['loja']), 'nombre' => trim(is_blank(utf8_encode(stripslashes(str_replace("'", "", $row['nombre']))))));
        }
    }
    echo json_encode($clientes);
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:17,代码来源:_acsa_ajax.php

示例9: validateAddition

function validateAddition()
{
    global $conn, $var_tid, $var_userid;
    if (trim($_POST["txtComments"]) == "" || trim($_POST["cmbMark"]) <= 0) {
        return false;
    } else {
        $sql = "select nUserId from sptbl_tickets where nTicketId='" . mysql_real_escape_string($var_tid) . "' and nUserId='" . mysql_real_escape_string($var_userid) . "'";
        $rs = executeSelect($sql, $conn);
        if (mysql_num_rows($rs) == 0) {
            return false;
        }
        return true;
    }
}
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:14,代码来源:editrating.php

示例10: validateAddition

function validateAddition($var_list)
{
    global $conn;
    $arr_check = array("open", "closed", "escalated");
    if (in_array(strtolower(trim($var_list)), $arr_check) == true) {
        return false;
    }
    $sql = "Select vLookUpValue from sptbl_lookup where vLookUpName='ExtraStatus' and vLookUpValue='{$var_list}'";
    $var_result = executeSelect($sql, $conn);
    if (mysql_num_rows($var_result) > 0) {
        return false;
    } elseif (isValidStatus($var_list)) {
        return true;
    }
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:15,代码来源:status.php

示例11: isPasswordCorrect

function isPasswordCorrect($password, $userid)
{
    global $conn;
    $sql = "SELECT vPassword FROM sptbl_users  WHERE nUserId = '" . mysql_real_escape_string($userid) . "'";
    $rs = executeSelect($sql, $conn);
    if (mysql_num_rows($rs) != 0) {
        $row = mysql_fetch_array($rs);
        $pass = $row["vPassword"];
        if ($pass == md5($password)) {
            return true;
        } else {
            return false;
        }
    } else {
        return false;
    }
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:17,代码来源:changepassword.php

示例12: cargarHistorial

 public function cargarHistorial($id = false, $ticket = false, $staff = false, $cliente = false, $citacion = false, $view_ticket = false)
 {
     // cargo el historial
     if ($id != false) {
         $sql = "SELECT * FROM acsa_historial WHERE id='{$id}' LIMIT 1";
     }
     if ($ticket != false) {
         $sql = "SELECT * FROM acsa_historial WHERE ticket_id='{$ticket}' LIMIT 1";
     }
     if ($staff != false) {
         $sql = "SELECT * FROM acsa_historial WHERE staff_id='{$staff}' LIMIT 1";
     }
     if ($cliente != false) {
         $sql = "SELECT * FROM acsa_historial WHERE cliente_id='{$cliente}' LIMIT 1";
     }
     if ($citacion != false) {
         $sql = "SELECT * FROM acsa_historial WHERE citacion_id='{$citacion}' LIMIT 1";
     }
     if ($view_ticket != false) {
         $sql = "SELECT * FROM acsa_historial WHERE ticket_id='{$ticket}' AND show_in_ticket='1'";
     }
     $rs = executeSelect($sql, $this->conn);
     if (mysql_num_rows($rs) > 0 and $view_ticket == false) {
         $row = mysql_fetch_array($rs);
         $this->setId($row['id']);
         $this->setClienteId($row['cliente_id']);
         $this->setCitacionId($row['citacion_id']);
         $this->setTicketId($row['ticket_id']);
         $this->setStaffId($row['staff_id']);
         $this->setFecha($row['fecha']);
         $this->setDescripcion($row['descripcion']);
         $this->setShowInTicket($row['show_in_ticket']);
         $this->setDerviado($row['derivado']);
         return true;
     } elseif (mysql_num_rows($rs) > 0 and $view_ticket == true) {
         return $rs;
     } else {
         return false;
     }
 }
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:40,代码来源:historial.php

示例13: validateUpdation

function validateUpdation()
{
    global $conn;
    $returnFlag = "";
    if (trim($_POST["txtLangCode"]) == "" || trim($_POST["txtLangDesc"]) == "") {
        $returnFlag = false;
    } else {
        $sql = "Select vLangCode,vLangDesc from sptbl_lang where\r\n                  vLangCode='" . mysql_real_escape_string($var_langCode) . "' or\r\n                  vLangDesc='" . mysql_real_escape_string($var_langDesc) . "'";
        if (mysql_num_rows(executeSelect($sql, $conn)) > 0) {
            $returnFlag = false;
        } else {
            $returnFlag = true;
        }
    }
    return $returnFlag;
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:16,代码来源:editlang.php

示例14: count

		if($var_year !="" and $var_month !="")	{
		  $datefilter="$var_year"."-"."$var_month";
		}else{
		  $datefilter=date("Y-m");
		}*/
$sql = " select count(*) as cnt from sptbl_tickets where nDeptid in({$lst_dept}) and  dPostDate like '{$datefilter}%' ";
$rs_cnt = executeSelect($sql, $conn);
$row = mysql_fetch_array($rs_cnt);
$totlnum_tickets = $row['cnt'];
mysql_free_result($rs_cnt);
$ticket_status_name = array();
$ticket_value_cnt = array();
$ticket_status_clr = array();
foreach ($status_arr as $key => $value) {
    $sql = " select count(*) as cnt from sptbl_tickets where  dPostDate like '{$datefilter}%' and nDeptid in({$lst_dept}) and vStatus='" . mysql_real_escape_string($value) . "'";
    $rs_cnt = executeSelect($sql, $conn);
    $row = mysql_fetch_array($rs_cnt);
    array_push($ticket_value_cnt, $row['cnt']);
    array_push($ticket_status_name, $value);
    array_push($ticket_status_clr, colorCode());
    mysql_free_result($rs_cnt);
}
?>

<table   border="0" cellpadding="0" cellspacing="3" width="100%" >
      <?php 
if ($totlnum_tickets > 0) {
    ?>
          <tr align="left"  class="toplinks" valign="bottom" > <td colspan=<?php 
    echo count($ticket_value_cnt) * 3;
    ?>
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:31,代码来源:staticsdetail.php

示例15: getConnection

// +----------------------------------------------------------------------+
// | This source file is a part of supportpro supportdesk                 |
// +----------------------------------------------------------------------+
// | Authors: programmer1<programmer1@armia.com>                          |
// |          programmer1<programmer2@armia.com>                          |
// +----------------------------------------------------------------------+
require_once "./includes/applicationheader.php";
$conn = getConnection();
$sql1 = "UPDATE sptbl_staffs  ";
$sql1 .= " SET vOnline = '0' WHERE nStaffId = '" . $_SESSION['sess_staffid'] . "' ";
$result1 = executeSelect($sql1, $conn);
/*Added by Amaldev for Livechat*/
$sqlu = "UPDATE sptbl_chat SET vStatus = 'finished', dTimeEnd = now() WHERE nStaffId = '" . $_SESSION['sess_staffid'] . "' and vStatus != 'finished' ";
$resultu = executeSelect($sqlu, $conn);
$sqls = "UPDATE sptbl_operatorchat SET vStatus = 'finished', dTimeEnd=now() WHERE (nFirstStaffId = '" . $_SESSION['sess_staffid'] . "' || nSecondStaffId = '" . $_SESSION['sess_staffid'] . "' ) and vStatus != 'finished' ";
$results = executeSelect($sqls, $conn);
$_SESSION['sess_staffid'] = "";
$_SESSION['sess_staffname'] = "";
$_SESSION['sess_staffemail'] = "";
$_SESSION['sess_stafffullname'] = "";
$_SESSION["sess_isadmin"] = "";
$_SESSION["sess_cssurl"] = "";
$_SESSION["sess_abackreplyurl"] = "";
//session_unregister('sess_abackreplyurl');
unset($_SESSION['sess_abackreplyurl']);
//session_unregister('sess_cssurl');
unset($_SESSION['sess_cssurl']);
//session_unregister('sess_staffid');
unset($_SESSION['sess_staffid']);
//session_unregister('sess_staffname');
unset($_SESSION['sess_staffname']);
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:31,代码来源:logout.php


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