本文整理汇总了PHP中CRUD::dbSelect方法的典型用法代码示例。如果您正苦于以下问题:PHP CRUD::dbSelect方法的具体用法?PHP CRUD::dbSelect怎么用?PHP CRUD::dbSelect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRUD
的用法示例。
在下文中一共展示了CRUD::dbSelect方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CRUD
<?php
$db = new CRUD();
$setup = $db->dbSelect('setup', 'layout', 'setup');
$setup = $setup['0'];
?>
<header class="header back-trans">
<a class="header-title fc-beta" href="http://www.cwikiwebdev.com">
<div class="header-title fc-beta">
<?php
echo $setup['title'];
?>
</div>
<img class="header-logo" src="images/sig-header.png">
<div class="header-sub fc-alpha">
<?php
echo $setup['subtitle'];
?>
</div>
</a>
</header>
示例2: CRUD
<?php
$db = new CRUD();
/*grabs Biography data*/
$bio = $db->dbSelect('bio', 'bio_version', '0');
$bio = $bio['0'];
/*creates workable object for social links*/
$social = $db->dbSelect('social', 'enabled_bool', true);
$author = $db->dbSelect('author', 'username', 'cwikidev');
$author = $author['0'];
?>
<div class="contact">
<img class="ci-portrait" src="images/sig-background-p.png">
<img class="ci-landscape" src="images/sig-background.png">
<div class="contact-body">
<div class="contact-text">
<div class="contact-text-title fc-beta eh-text">
<p><?php
echo $bio['title'];
?>
</p>
</div>
<!--see more link-->
<div class="contact-text-body ff-reading text text-size-norm">
<p><?php
echo $bio['text'];
?>
</p>
</div>
示例3: CreateAuthor
$auth = new CreateAuthor();
$message = $auth->getMessage();
} else {
$message = "Your passwords didn't match";
}
break;
case 'delete-author':
$conn->dbDelete('author', 'username', $_POST['forDeletion']);
$message = "Author " . $_POST['forDeletion'] . " Deleted";
break;
case 'set-showcase':
$conn->dbUpdate('setup', 'article_id', $_POST['showcaseSelected'], 'layout', 'setup');
break;
}
}
$setup = $conn->dbSelect('setup', 'layout', 'setup');
?>
<div class="cwiki-admin">
<img class="ci-portrait" src="images/sig-background-p.png">
<img class="ci-landscape" src="images/sig-background.png">
<div class="cwiki-body c-gen-body">
<div class="cwiki-text c-gen-text back-trans fc-white">
<?php
echo $message;
?>
<br>
<!--Selects from all non-superusers-->
示例4: CRUD
<?php
$db = new CRUD();
$article = $db->dbSelect('article', 'display_bool', true);
/*Sets default Gallery item*/
if (isset($_POST['cur_gal_item'])) {
$current = $_POST['cur_gal_item'];
} else {
$current = 0;
}
?>
<div class="gallery">
<div class="gallery-body">
<div class="gallery-text">
<div class="gallery-text-title fc-beta el-text">
<p>Project</p>
</div>
<div class="gallery-text-subtitle fs-bold fc-alpha el-text">
<p>
<?php
echo $article[$current]['title'];
?>
</p>
</div>
<?php
/*Inserts a external link if it exists in the article*/
if (isset($article[$current]['external_url'])) {
?>
<div class="gallery-see-more gallery-text-title ">
示例5: CRUD
<?php
$db = new CRUD();
/*Grabs the appropraite showcase item from the setup table*/
$setup = $db->dbSelect('setup', 'layout', 'setup');
$showcase = $setup['0']['article_id'];
/*Grabs the article information for the Showcase*/
$article = $db->dbSelect('article', 'article_id', $showcase);
$showcase = $article['0'];
/*Loads the background image location if it exists*/
$showcaseImage = new ShowcaseImage($showcase['image_name']);
$showcaseImage = $showcaseImage->getShowcaseImage();
?>
<div class="showcase">
<img class="showcase-img" src="<?php
echo $showcaseImage;
?>
">
<div class="border-box">
<div class="showcase-body">
<div class="showcase-text back-trans">
<div class="showcase-text-title fc-beta h-text">
<p><?php
echo $showcase['title'];
if (isset($showcase['external_url'])) {
?>
<a class="more-about-showcase fc-alpha s-text"
href="<?php