本文整理汇总了PHP中DBUtils::getOne方法的典型用法代码示例。如果您正苦于以下问题:PHP DBUtils::getOne方法的具体用法?PHP DBUtils::getOne怎么用?PHP DBUtils::getOne使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBUtils
的用法示例。
在下文中一共展示了DBUtils::getOne方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getOne
public static function getOne($articleId)
{
$pdo = new DBUtils();
$sql = "select * from article where articleId = {$articleId}";
$rs = $pdo->getOne($sql);
return $rs;
}
示例2: getTeacherInfo
public static function getTeacherInfo($teacherDesId)
{
$pdo = new DBUtils();
$sql = "select * from teacherDes where teacherDesId = '{$teacherDesId}'";
$rs = $pdo->getOne($sql);
return $rs;
}
示例3: getCurrentNavInfo
function getCurrentNavInfo($snavId)
{
$pdo = new DBUtils();
$sql = "select * from second_nav where snavId = '{$snavId}'";
$rs = $pdo->getOne($sql);
return $rs;
}
示例4: getOne
public static function getOne($aboutusId)
{
$pdo = new DBUtils();
$sql = "select * from aboutus where aboutusId = '{$aboutusId}'";
$rs = $pdo->getOne($sql);
return $rs;
}
示例5: getOne
public static function getOne($newsDesId)
{
$pdo = new DBUtils();
$sql = "select * from newsDes where newsDesId = '{$newsDesId}'";
$rs = $pdo->getOne($sql);
return $rs;
}
示例6: getOne
public static function getOne($courseId)
{
$pdo = new DBUtils();
$sql = "select * from course where courseId = {$courseId}";
$course = $pdo->getOne($sql);
$sql = "select * from courseType where courseId = {$courseId}";
$courseType = $pdo->query($sql);
return array("course" => $course, "courseType" => $courseType);
}