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


PHP conDB函数代码示例

本文整理汇总了PHP中conDB函数的典型用法代码示例。如果您正苦于以下问题:PHP conDB函数的具体用法?PHP conDB怎么用?PHP conDB使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: all_posts

function all_posts()
{
    include "includes/db_con.inc";
    $conn = conDB();
    $query = "SELECT * FROM posts";
    $posts = q($query);
    return $posts;
}
开发者ID:anfleene,项目名称:N342,代码行数:8,代码来源:post_index.php

示例2: find_post

function find_post($id)
{
    include "includes/db_con.inc";
    $conn = conDB();
    $query = "SELECT * FROM posts where posts.id = '" . $id . "'";
    $result = q($query);
    $post = mysql_fetch_array($result);
    return $post;
}
开发者ID:anfleene,项目名称:N342,代码行数:9,代码来源:post_show.php

示例3: create_post

function create_post($title, $content)
{
    //establish a database connection
    include "includes/db_con.inc";
    $conn = conDB();
    //build an insert query
    $query = sprintf("INSERT INTO posts (title, body, created, modified) VALUES('%s', '%s', '%s', '%s') ", mysql_real_escape_string($title), mysql_real_escape_string($content), date("Y-m-d H:i:s"), date("Y-m-d H:i:s"));
    q($query);
    //select the most recently created post
    $result = q("SELECT id FROM posts ORDER BY posts.id DESC LIMIT 1");
    $post = mysql_fetch_array($result);
    //return the id of the last post
    return $post['id'];
}
开发者ID:anfleene,项目名称:N342,代码行数:14,代码来源:post_create.php

示例4: session_start

<?php

session_start();
include "phpconf.php";
include "func.php";
conDB();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<title>- - ÃкºÍÔ¹·ÃÒà¹çµ | <?php 
echo "&nbsp;" . $Hospname . "&nbsp;";
?>
 | - - ÀÒÇÐâÀª¹Ò¡Òà ºÑ­ªÕ 3áÅÐ4 - - |</title>
<style type="text/css">
<!--
body {  margin: 0px  0px; padding: 0px  0px}
body{font-family:MS Sans Serif;font-size:10pt}
table,td{font-family:MS Sans Serif;font-size:10pt}
form{font-family:MS Sans Serif;font-size:10pt}
-->
</style>
<?php 
//set theme
print "<link href='css/{$Theme}.css' rel='stylesheet' type='text/css'>";
?>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
开发者ID:jeerayuth,项目名称:hosxp,代码行数:31,代码来源:report_in_department_nutrition34.php

示例5: getLocationName

function getLocationName($LID)
{
    $conn = conDB();
    $sql = "SELECT Name FROM locations WHERE IDKey='{$LID}'";
    $result = mysqli_query($conn, $sql);
    $row = $result->fetch_assoc();
    $name = $row["Name"];
    return $name;
}
开发者ID:CoolHeatCRM,项目名称:island,代码行数:9,代码来源:Functions.php

示例6: session_start

<?php

//Initial Setup
session_start();
$_SESSION["servername"] = "localhost";
$_SESSION["Dusername"] = "web";
$_SESSION["Dpassword"] = "";
$_SESSION["dbname"] = "crm2";
$_SESSION["username"] = $_POST["user"];
$_SESSION["password"] = $_POST["pass"];
$_SESSION["idnum"] = 0;
$_SESSION["MINI"] = "0";
$_SESSION["DISPLAY"] = "1";
//Grant access to Core
include_once 'Core.php';
//Print out the header
NoSessionHeadprint();
$conn = conDB();
$user = $_SESSION["username"];
$pass = $_SESSION["password"];
$_SESSION["idnum"] = login($user, $pass);
$AID = $_SESSION["idnum"];
printUI($AID, "0", "0", FALSE);
//Print out the Tail section, possibly to be discontinued soon
TailPrint();
开发者ID:CoolHeatCRM,项目名称:CRM2,代码行数:25,代码来源:login.php

示例7: getIndexPermissions

function getIndexPermissions($IndexID)
{
    $conn = conDB();
    $sql = "SELECT PermIDV,PermIDE FROM cusindex WHERE IDKey='{$IndexID}'";
    $result = mysqli_query($conn, $sql);
    $row = $result->fetch_assoc();
    $returns = array();
    $returns[0] = $row["PermIDV"];
    $returns[1] = $row["PermIDE"];
    return $returns;
}
开发者ID:CoolHeatCRM,项目名称:CRM2,代码行数:11,代码来源:Core.php


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