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


PHP AppConfig::gacv方法代码示例

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


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

示例1: get_table

 function get_table($paged = 0)
 {
     /* Execute a prepared statement by passing an array of values */
     $dbh = new PDO('mysql:dbname=' . AppConfig::gacv("AC_db") . ';host=' . AppConfig::gacv("AC_server"), AppConfig::gacv("AC_user"), AppConfig::gacv("AC_pass"));
     $sql = sprintf("select * from %s WHERE " . $this->lookup_tbl_id_col . " = :lookup_tbl_id_col OR 1 = :lookup_not_set order by %s", $this->tbl_name, $this->lookup_value_col);
     if ($paged) {
         $sql .= MyEDB_Pager::get_sql_limit_clause();
     }
     $sth = $dbh->prepare($sql, array(PDO::ATTR_CURSOR, PDO::CURSOR_FWDONLY));
     //
     //$sth->execute(array(':lookup_tbl_id_col' => ($_REQUEST[$this->lookup_tbl_id_col])? $_REQUEST[$this->lookup_tbl_id_col] : $this->lookup_tbl_id_col));
     $sth->bindParam(':lookup_tbl_id_col', $lookup_tbl_id_col);
     $sth->bindParam(':lookup_not_set', $lookup_not_set);
     $lookup_tbl_id_col = $_REQUEST[$this->lookup_tbl_id_col];
     $lookup_not_set = $_REQUEST[$this->lookup_tbl_id_col] ? 0 : 1;
     $sth->execute();
     $res = $sth->fetchAll(PDO::FETCH_BOTH);
     //echo $sql.$this->lookup_tbl_id_col;//
     $table_hash = array();
     //print_r($res);
     foreach ($res as $ar) {
         //echo $sql."-".$lookup_tbl_id_col." ".$lookup_not_set;
         $table_hash[$ar[0]] = array($ar[1], "lookup_table_id" => $ar[$this->lookup_tbl_id_col], "disabled" => $ar['disabled']);
     }
     return $table_hash;
 }
开发者ID:awgtek,项目名称:myedb,代码行数:26,代码来源:SubLookupTable.php

示例2: delete_search_keys

 function delete_search_keys()
 {
     $dbh = new PDO('mysql:dbname=' . AppConfig::gacv("AC_db") . ';host=' . AppConfig::gacv("AC_server"), AppConfig::gacv("AC_user"), AppConfig::gacv("AC_pass"));
     $memcache_obj = memcache_pconnect('localhost', 11211);
     $sql = sprintf("select search_key from %s ", "memcache_search_keys");
     $sth = $dbh->prepare($sql, array(PDO::ATTR_CURSOR, PDO::CURSOR_FWDONLY));
     //
     $sth->execute();
     $res = $sth->fetchAll(PDO::FETCH_BOTH);
     //echo $sql.$this->lookup_tbl_id_col;//
     foreach ($res as $ar) {
         memcache_delete($memcache_obj, $ar["search_key"], 0);
     }
     /* Delete all rows from the FRUIT table */
     $count = $dbh->exec("DELETE FROM memcache_search_keys");
 }
开发者ID:awgtek,项目名称:myedb,代码行数:16,代码来源:memcache_search_key.php

示例3: update_medb_order_res_field_name_value

	function update_medb_order_res_field_name_value($res_field_name, $new_value)
	{	 
		if (1 == get_magic_quotes_runtime() || 1 == get_magic_quotes_gpc()){ 
        	$new_value = stripslashes($new_value); //PDO does the escaping 
    	} 
    	$new_value = trim($new_value);
    	//$new_value = htmlspecialchars($new_value,ENT_NOQUOTES);
    	//echo htmlentities($new_value)."-[-"; die();
		//$new_value = htmlentities($new_value, ENT_QUOTES);
		
		$dbh = new PDO('mysql:dbname='.AppConfig::gacv("AC_db").';host='.AppConfig::gacv("AC_server")
				,AppConfig::gacv("AC_user"),AppConfig::gacv("AC_pass")); 
		$sql = sprintf("select details_xml from medb_order WHERE order_id = :pdo_order_id "); 
		$sth = $dbh->prepare($sql ,array(PDO::ATTR_CURSOR, PDO::CURSOR_FWDONLY));//
		//$sth->execute(array(':lookup_tbl_id_col' => ($_REQUEST[$this->lookup_tbl_id_col])? $_REQUEST[$this->lookup_tbl_id_col] : $this->lookup_tbl_id_col));
		$sth->bindParam(':pdo_order_id',$this->order_id, PDO::PARAM_INT);
	//	$sth->bindParam(':lookup_not_set',$lookup_not_set);
	//	$lookup_tbl_id_col = $_REQUEST[$this->lookup_tbl_id_col] ;
	//	$lookup_not_set = ($_REQUEST[$this->lookup_tbl_id_col])? 0 : 1;
		$sth->execute();
		$details_xml = $sth->fetchColumn();
		
		$xml = simplexml_load_string($details_xml);

		$result = $xml->xpath("/travel_res_info/travel_res_submitted_fields/travel_res_submit_field [@res_field_name='" . $res_field_name . "']" );

		$result[0]->res_field_value=$new_value;
  		$new_details_xml = $xml->asXML();
		//echo "yoohoo".htmlentities($xml->asXML()); die;
		
		$sql = sprintf("update medb_order set details_xml = :new_details_xml WHERE order_id = :pdo_order_id "); 
		$sth = $dbh->prepare($sql ,array(PDO::ATTR_CURSOR, PDO::CURSOR_FWDONLY));//
		//$sth->execute(array(':lookup_tbl_id_col' => ($_REQUEST[$this->lookup_tbl_id_col])? $_REQUEST[$this->lookup_tbl_id_col] : $this->lookup_tbl_id_col));
		$sth->bindParam(':pdo_order_id',$this->order_id, PDO::PARAM_INT);
		$sth->bindParam(':new_details_xml',$new_details_xml);
	//	$lookup_tbl_id_col = $_REQUEST[$this->lookup_tbl_id_col] ;
	//	$lookup_not_set = ($_REQUEST[$this->lookup_tbl_id_col])? 0 : 1;
		$sth->execute();
		
		return $new_value;
				
	}
开发者ID:awgtek,项目名称:myedb,代码行数:42,代码来源:medb_order.php

示例4: get_all_eids_by_type_category

 function get_all_eids_by_type_category($type_category, $type_id)
 {
     /*		$sql = "select distinct eid from view_varchar_prop_to_e_p_to_e natural join type where  type_category = 'product'  ";
     		$eids = array();
     		$result = mysql_query($sql);
     		while ($row = mysql_fetch_array($result))
     		{
     			$eids[] = $row['eid'];
     		}
     		return $eids;
     */
     $dbh = new PDO('mysql:dbname=' . AppConfig::gacv("AC_db") . ';host=' . AppConfig::gacv("AC_server"), AppConfig::gacv("AC_user"), AppConfig::gacv("AC_pass"));
     $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
     $all_types = 0;
     if ($type_id > 0) {
         $sql_type_id = $type_id;
         //echo "I'm here";
     } else {
         $sql_type_id = "";
         $all_types = 1;
     }
     $thisclass = get_class($this);
     $sql = sprintf("select distinct eid from {$thisclass} natural join type WHERE type_category = :the_type_category \n\t\t\t\tand (type_id = :sql_type_id or 1 = :all_types)");
     //echo $sql;
     $sth = $dbh->prepare($sql, array(PDO::ATTR_CURSOR, PDO::CURSOR_FWDONLY));
     //
     //$sth->execute(array(':lookup_tbl_id_col' => ($_REQUEST[$this->lookup_tbl_id_col])? $_REQUEST[$this->lookup_tbl_id_col] : $this->lookup_tbl_id_col));
     $sth->bindParam(':the_type_category', $type_category);
     $sth->bindParam(':sql_type_id', $sql_type_id);
     $sth->bindParam(':all_types', $all_types, PDO::PARAM_INT);
     $sth->execute();
     $res = $sth->fetchAll(PDO::FETCH_BOTH);
     //echo $sql.$this->lookup_tbl_id_col;//
     $eids = array();
     // print_r($res);
     foreach ($res as $ar) {
         $eids[] = $ar['eid'];
     }
     return $eids;
 }
开发者ID:awgtek,项目名称:myedb,代码行数:40,代码来源:view_x_prop_to_e_p_to_e.php

示例5: getpdo

	static function getpdo()
	{
		$dbh = new PDO('mysql:dbname='.AppConfig::gacv("AC_db").';host='.AppConfig::gacv("AC_server"),AppConfig::gacv("AC_user"),AppConfig::gacv("AC_pass")); 
		return $dbh;
	}
开发者ID:awgtek,项目名称:myedb,代码行数:5,代码来源:dbops.php


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