當前位置: 首頁>>代碼示例>>PHP>>正文


PHP connection::getConnection方法代碼示例

本文整理匯總了PHP中connection::getConnection方法的典型用法代碼示例。如果您正苦於以下問題:PHP connection::getConnection方法的具體用法?PHP connection::getConnection怎麽用?PHP connection::getConnection使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在connection的用法示例。


在下文中一共展示了connection::getConnection方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getRowCount

 public static function getRowCount()
 {
     $con = new connection();
     $connection = $con->getConnection();
     $query = "select * from manufacturer";
     $result = $connection->query($query) or die(mysqli_error($connection));
     return mysqli_num_rows($result) + 10;
 }
開發者ID:botocorpers,項目名稱:randomSerialsGenerator,代碼行數:8,代碼來源:manufacturer.php

示例2: uploadFile

 public function uploadFile($uploadclassObj)
 {
     $fileid = $uploadclassObj->getFileid();
     $upload_filename = $uploadclassObj->getFilename();
     $con = new connection();
     $connection = $con->getConnection();
     $query = "insert into uploads values(null, '{$fileid}', '{$upload_filename}')";
     $result = $connection->query($query) or die(mysqli_error($connection));
 }
開發者ID:botocorpers,項目名稱:SmartDocApp,代碼行數:9,代碼來源:uploadDAO.php

示例3: getUserByName

 public function getUserByName($name)
 {
     $con = new connection();
     $db = $con->getConnection();
     $sql = "SELECT * FROM user WHERE name=" . $name;
     foreach ($db->query($sql) as $row) {
         $user[] = array('id' => $row['id'], 'name' => $row['name'], 'password' => $row['password'], 'mail' => $row['mail'], 'adresse' => $row['adresse'], 'tel' => $row['tel']);
     }
 }
開發者ID:Code2Consumer,項目名稱:bibliotheque,代碼行數:9,代碼來源:user.php

示例4: connection

<html>
<head>
	<link rel="stylesheet" type="text/css" href="css/css/bootstrap.min.css">
	<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>

<?php 
require_once "connection.php";
$con = new connection();
$connection = $con->getConnection();
$query = "select * from manufacturer where active=1";
$result = $connection->query($query) or die(mysqli_error($connection));
?>
<div class="container-fluid head" >
	
  <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
	RandomGenerator
</div>

<div class="row">
<br/><br/><br/><br/><br/><br/>
	<div class="col-md-2 col-md-offset-3">
			<div id="nav">
				<div class="active"><a href="index.php">Generate Serials</a></div>
				<div><a href="create.php">Create New User</a></div>	
				<div><a href="editList.php">Add/Delete User</a></div>
			</div>
	</div>

	<div class="col-md-3 main">
開發者ID:botocorpers,項目名稱:randomSerialsGenerator,代碼行數:31,代碼來源:index.php

示例5: __construct

 public function __construct(connection $con)
 {
     $this->condb = $con->getConnection();
 }
開發者ID:s10733,項目名稱:gardenWeb,代碼行數:4,代碼來源:espDevices.php


注:本文中的connection::getConnection方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。