本文整理汇总了PHP中connection::close方法的典型用法代码示例。如果您正苦于以下问题:PHP connection::close方法的具体用法?PHP connection::close怎么用?PHP connection::close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类connection
的用法示例。
在下文中一共展示了connection::close方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
public function load($iRecordID)
{
$oCon = new connection();
$sSQL = "SELECT RecordID, Title, Artist, Price, GenreID, PhotoPath\n\t\t\t\tFROM tbrecords \n\t\t\t\tWHERE RecordID = " . $iRecordID;
$oResultSet = $oCon->query($sSQL);
$aRow = $oCon->fetchArray($oResultSet);
$this->iRecordID = $aRow['RecordID'];
$this->sTitle = $aRow['Title'];
$this->sArtist = $aRow['Artist'];
$this->fPrice = $aRow['Price'];
$this->iGenreID = $aRow['GenreID'];
$this->iPhotoPath = $aRow['PhotoPath'];
$oCon->close();
}
示例2: connection
<?php
require_once 'dotclear/inc/prepend.php';
$con = new connection($dbuser, $dbpass, $dbhost, $dbbase);
$blog = new blog($con, DB_PREFIX, 1, dc_encoding);
$news = $blog->getLastNews(3, 'actualite');
if ($news->isEmpty()) {
echo " <p>Aucune actualité</p>\n";
} else {
while (!$news->EOF()) {
echo ' <h3>', $news->f('post_titre'), "</h3>\n";
echo ' <h4>', strftime('%x', strtotime($news->f('post_dt'))), "</h4>\n";
echo ' ', $news->f('post_content'), "\n\n";
$news->moveNext();
}
}
$con->close();
?>
<p class="tous"><a href="/actualite/">Toutes les actualités</a></p>
</div>
<!-- Fin Actualité -->
<!-- Début Derniers Articles -->
<div id="articles">
<?php
OW_liste_document(array('type' => 'A'), 3, 'Derniers articles…');
?>
<p class="tous"><a href="/articles/">Tous les articles</a></p>
</div>
<!-- Fin Derniers Articles -->
</div>