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


PHP db::db_connect方法代码示例

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


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

示例1: SelectAppliSearch

 public function SelectAppliSearch($name, $enseigne, $irt, $trigramme)
 {
     $tabParam = array();
     if ($name) {
         $tabParam['libelle'] = $name;
     }
     if ($enseigne) {
         $tabParam['enseigne'] = $enseigne;
     }
     if ($irt) {
         $tabParam['irt'] = $irt;
     }
     if ($trigramme) {
         $tabParam['trigramme'] = $trigramme;
     }
     $rq = "SELECT ID,LIBELLE,ENSEIGNE,IRT,TRIGRAMME  FROM " . SCHEMA . ".APPLICATION ";
     $rq .= "WHERE ";
     $l = 1;
     foreach ($tabParam as $key => $value) {
         $or = $l != count($tabParam) ? " AND" : "";
         $rq .= "UPPER(REPLACE({$key},' ','')) LIKE '%" . strtoupper(str_replace(' ', '', $value)) . "%' " . $or;
         $l++;
     }
     $rq .= " ORDER BY NAME";
     $db = new db();
     $db->db_connect();
     $db->db_query($rq);
     $res = $db->db_fetch_array();
     return $res;
 }
开发者ID:anisinfo,项目名称:osi,代码行数:30,代码来源:Application.php

示例2: SupprimerUtilisateur

 public function SupprimerUtilisateur($id)
 {
     $rq = "DELETE FROM " . SCHEMA . ".UTILISATEURS_OSI WHERE ID=" . $id;
     $SCHEMA = new db();
     $SCHEMA->db_connect();
     $SCHEMA->db_query($rq);
 }
开发者ID:anisinfo,项目名称:osi,代码行数:7,代码来源:Utilisateurs.php

示例3: db

<?php

include_once 'class/class.main.php';
$connect = new db();
$connect->db_connect();
$limit = 20;
$page = (int) $_REQUEST['p'];
if ($page < 1) {
    $page = 1;
}
$offset = ($page - 1) * $limit;
//echo "SELECT SQL_CALC_FOUND_ROWS p.rated1, p.rated2, p.rated3, p.rated4, p.rated5, p.rated6, p.rated7, p.aveRate,p.photo_url,p.userName,c.item2Rate,c.selectedItems, pr.businessName, pr.address, pr.city, pr.country, pr.zip FROM photoshare AS p LEFT JOIN businessCustom AS c ON c.customPlaceId = p.placeId LEFT JOIN businessProfile as pr ON pr.profilePlaceId=p.placeId ORDER BY p.id DESC LIMIT $offset,$limit";
$result = mysql_query("SELECT SQL_CALC_FOUND_ROWS p.rated1, p.rated2, p.rated3, p.rated4, p.rated5, p.rated6, p.rated7, p.aveRate,p.photo_url,p.userName,c.item2Rate,c.selectedItems, pr.businessName, pr.address, pr.city, pr.country, pr.zip, pr.nicename,p.comment,p.userId FROM photoshare AS p LEFT JOIN businessCustom AS c ON c.customPlaceId = p.placeId LEFT JOIN businessProfile as pr ON pr.profilePlaceId=p.placeId WHERE p.source = 'fb' ORDER BY p.id DESC LIMIT {$offset},{$limit}");
$numberOfRows = mysql_result(mysql_query("SELECT FOUND_ROWS()"), 0, 0);
$totalPages = ceil($numberOfRows / $limit);
?>
<!DOCTYPE html>
<html>
<head>
    <meta name="robots" content="noindex, nofollow"/>
	<title>Photos share on facebook</title>
    <link href="css/bootstrap.css" rel="stylesheet" media="all">
    <link href="css/style.css" rel="stylesheet" media="all">
    <link rel="stylesheet" href="css/flexslider.css" media="all">
	<script type="text/javascript" src="js/jquery.js"></script> 
    <script type="text/javascript" src="js/bootstrap.min.js"></script> 
  <script type="text/javascript" src="js/star-rating.js"></script> 
	<script type="text/javascript" src="js/sharephoto.js"></script>
	<style stype="css/text">
		section#photo{height:100%;width:100%;min-width:600px;max-width:66.8em;margin:0 auto;padding: 20px 0 20px 0;}
		section#photo .frame{width:100%;height:100%;padding: 10px 0 10px 0}
开发者ID:Tripbull,项目名称:newrepo,代码行数:31,代码来源:share_new.php

示例4: db

<?php

session_start();
$login = $_POST['Username'];
$pass = $_POST['Userpasswd'];
if (isset($login) && $login && isset($pass) && $pass) {
    require_once '../inc/config.inc.php';
    require_once '../classes/db.php';
    require_once '../inc/fonctions.inc.php';
    $rq = "SELECT ID,NOM,PRENOM,MAIL,LOGIN,PASSWD,PROFIL FROM " . SCHEMA . ".UTILISATEURS_OSI WHERE LOGIN='" . $login . "'";
    $SCHEMA = new db();
    $SCHEMA->db_connect();
    $SCHEMA->db_query($rq);
    $res = $SCHEMA->db_fetch_array();
    $total = $SCHEMA->total_record();
    if ($res[0]) {
        if (password_verify($pass, $res[0][5])) {
            $_SESSION['auth'] = $res[0];
            unset($_SESSION['flash']);
            $_SESSION['flash']['success'] = "Vous êtes connecté.";
            $contenu_fichier_json = file_get_contents('../inc/TraceFiche.json');
            $tr = json_decode($contenu_fichier_json, true);
            if (is_array($tr)) {
                foreach ($tr as $key => $value) {
                    if ($value['user'] == $userConnected) {
                        unset($tr[$key]);
                    }
                }
            }
            $json = json_encode($tr);
            file_put_contents('../inc/TraceFiche.json', $json);
开发者ID:anisinfo,项目名称:osi,代码行数:31,代码来源:confirm.php

示例5: date

			$commision =  $row2->commission + 20;
			$unpaid =  $row2->unpaid + 20;
			$sql = "UPDATE affsale SET sales=". $sales .",commission=". $commision .",unpaid=". $unpaid ." WHERE affId = ".$affid;
			mysql_query($sql);
		}else{
			$sales =  1;$commision = 20;$unpaid =  20;
			$sql = "INSERT INTO affsale SET sales=". $sales .",commission=". $commision .",unpaid=". $unpaid .", affId = ".$affid;
			mysql_query($sql);
		}
		header("Location: app/signup.html?cust_id=$cust_id&subs_id=$subs_id");
		//header("Location: http://tabluu.applicationcraft.com/app#/app?cust_id=$cust_id&subs_id=$subs_id");
	}
	$db->db_disconnect();
}else{ */
if (isset($_REQUEST['cust_id']) && isset($_REQUEST['subs_id']) && isset($_REQUEST['ref'])) {
    $db->db_connect();
    $cust_id = $_REQUEST['cust_id'];
    $url = '/customers/' . $cust_id . '/subscriptions.xml';
    $result = $connector->sendRequest($url, $format = 'xml', $method = 'GET', $data = '');
    if ($result->code == 200) {
        $objxml = simplexml_load_string($result->response);
        $state = $objxml->subscription->state;
        $expiry = $objxml->subscription->current_period_ends_at;
        $subs_id = $_REQUEST['subs_id'];
        $fname = $objxml->subscription->customer->first_name;
        $lname = $objxml->subscription->customer->last_name;
        $email = $objxml->subscription->customer->email;
        $productId = $objxml->subscription->product->id;
        $cust_id = $_REQUEST['cust_id'];
        $date = date('Y-m-d h:i:s');
        $gId = $_REQUEST['ref'];
开发者ID:Tripbull,项目名称:newrepo,代码行数:31,代码来源:track.php

示例6: checknicename

function checknicename()
{
    include_once 'class/class.main.php';
    $connect = new db();
    $connect->db_connect();
    $con = new fucn();
    $link = strtolower($con->rand_string(7));
    $result = mysql_query("SELECT id FROM businessProfile WHERE nicename = '{$link}'");
    //check if link is existed
    if (mysql_num_rows($result)) {
        checknicename();
    } else {
        return $link;
    }
    $connect->db_connect();
}
开发者ID:Tripbull,项目名称:newrepo,代码行数:16,代码来源:setData.php

示例7: SelectStat

 /**
  * Selectionnez la liste des stats
  *
  * @return $none
  */
 public function SelectStat()
 {
     $requette = "SELECT ID,REFCHANGEMENT,DATEPUBIR,DATEPUBPM,TYPECAUSE,TYPECAUSESECONDAIRE,TYPOLIGYGTS,KINDIMPACT,RESPONSIBLETEAM,FOURNISSEURRESPONSIBLE,POWERPROD,LEGACY,COMPOSANT,COMPOSANTCOMPLEMENT,ZONEGEOGRAPHIQUE ";
     $requette = "FROM  " . SCHEMA . ".STATISTIQUE ";
     $db = new db();
     $db->db_connect();
     $db->db_query($requette);
     $res = $db->db_fetch_array();
     $db->close();
     $tab = array();
     for ($i = 0; $i < count($res); $i++) {
         $valeur = $res[$i];
         array_push($tab, $this->SetParam($valeur[0], $valeur[1], $valeur[2], $valeur[3], $valeur[4], $valeur[5], $valeur[6], $valeur[7], $valeur[8], $valeur[9], $valeur[10], $valeur[11], $valeur[12], $valeur[13], $valeur[14]));
     }
     return $tab;
 }
开发者ID:anisinfo,项目名称:osi,代码行数:21,代码来源:Stat.php

示例8: Supprimer

 public function Supprimer()
 {
     $base = new db();
     $base->db_connect();
     //Suppression de Stat
     if ($this->getIdStat()) {
         $rq = "DELETE FROM " . SCHEMA . ".STATISTIQUE ";
         $rq .= "WHERE ID=" . $this->getIdStat();
         $base->db_query($rq);
     }
     //Suppression d'impact
     $rq = "DELETE  FROM " . SCHEMA . ".IMPACT ";
     $rq .= "WHERE INCIDENT_ID=" . $this->getNumero();
     $base->db_query($rq);
     // SUppression de l'incident
     $rq = "DELETE FROM " . SCHEMA . ".INCIDENT ";
     $rq .= "WHERE ID=" . $this->getNumero();
     $base->db_query($rq);
     $base->close();
 }
开发者ID:anisinfo,项目名称:osi,代码行数:20,代码来源:incidents.php

示例9: Supprimer

 /**
  *  Modification d'un objet
  *
  * @return mixed
  */
 public function Supprimer($id)
 {
     $rq = "DELETE FROM " . SCHEMA . ".CALENDRIER";
     $rq .= " WHERE ID=" . $id;
     $db = new db();
     $db->db_connect();
     $db->db_query($rq);
     $db->close();
 }
开发者ID:anisinfo,项目名称:osi,代码行数:14,代码来源:Calendrier.php

示例10: tweet_photo

function tweet_photo($tmhOAuth)
{
    $connect = new db();
    $connect->db_connect();
    $nice = strtolower($_REQUEST['l']);
    $splitID = explode('-', $nice);
    $sql = "SELECT s.pathimg, p.profilePlaceId, p.nicename, l.businessName, l.subscribe,u.state,v.link,cam.brand, cam.tag1, cam.tag2 FROM businessProfile AS p\n  LEFT JOIN businessList AS l ON l.id = p.profilePlaceId\n  LEFT JOIN businessUserGroup AS u ON u.gId = l.userGroupId\n  LEFT JOIN businessvanitylink AS v ON v.placeId = l.id\n  LEFT JOIN campaigndetails AS cam ON cam.posterId = l.id\n  LEFT JOIN businessCustom AS c ON c.customPlaceId = p.profilePlaceId\n  LEFT JOIN sharedlink_{$splitID[1]} AS s ON s.link = '{$nice}'\n  WHERE p.profilePlaceId =  {$splitID[1]}\n  LIMIT 1";
    $result1 = mysql_query($sql) or die(mysql_error());
    $row = mysql_fetch_object($result1);
    $dir = __DIR__ . '/' . $row->pathimg;
    $getpath = explode('/', $row->pathimg);
    $params = array('media[]' => "@{$dir};type={'jpg'};filename={$getpath[3]}", 'status' => $row->businessName . ' -- ' . strtolower($row->tag1) . ' ' . strtolower($row->tag2) . ' by ' . $row->brand . ' ' . 'http://camrally.com/app/user/' . $nice);
    $code = $tmhOAuth->user_request(array('method' => 'POST', 'url' => $tmhOAuth->url("1.1/statuses/update_with_media"), 'params' => $params, 'multipart' => true));
    if ($code == 200) {
        $data = json_decode($tmhOAuth->response['response'], true);
    } else {
        error("There was an error communicating with Twitter. {$tmhOAuth->response['response']}");
        return;
    }
}
开发者ID:Tripbull,项目名称:newrepo,代码行数:20,代码来源:oauth_authorize_flow.php

示例11: chargerImpact

 public function chargerImpact($id)
 {
     $req = "SELECT ID,INCIDENT_ID,APPLICATION_ID,TO_CHAR(DATESTART,'DD/MM/YYYY HH24:MI'),TO_CHAR(DATEEND,'DD/MM/YYYY HH24:MI'),DUREEREELLE,JOURHOMME,IMPACTMETIER,IMPACT,SLA,SEVERITE,DESCRIPTION,CREATED,UPDATED ";
     $req .= "FROM " . SCHEMA . ".IMPACT WHERE ID=" . $id . " ";
     $req .= "ORDER BY ID ASC";
     $base = new db();
     $base->db_connect();
     $base->db_query($req);
     $res = $base->db_fetch_array();
     $base->close();
     $this->setParam($res[0][0], $res[0][1], $res[0][2], $res[0][3], $res[0][4], $res[0][5], $res[0][6], $res[0][7], $res[0][8], $res[0][9], $res[0][10], $res[0][11], $res[0][12], $res[0][13]);
     return $this;
 }
开发者ID:anisinfo,项目名称:osi,代码行数:13,代码来源:Impact.php

示例12: checkshortULR

function checkshortULR()
{
    include_once 'class/class.main.php';
    $connect = new db();
    $connect->db_connect();
    $con = new fucn();
    $link = strtolower($con->rand_string(6));
    $result = mysql_query("SELECT id,source FROM businessshorturl WHERE link = '{$link}'");
    //check if link is existed
    if (mysql_num_rows($result)) {
        checkshortULR();
    } else {
        return $link;
    }
    $connect->db_connect();
}
开发者ID:Tripbull,项目名称:newrepo,代码行数:16,代码来源:getData.php


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